mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-17 19:30:00 +08:00
Improve MS VC builds for psql by handlling flex properly and prevent
rename prototype conflict.
This commit is contained in:
parent
a6cb7fd60a
commit
f6b896b17a
@ -37,6 +37,7 @@ NULL=nul
|
|||||||
|
|
||||||
CPP=bcc32.exe
|
CPP=bcc32.exe
|
||||||
PERL=perl.exe
|
PERL=perl.exe
|
||||||
|
FLEX=flex.exe
|
||||||
|
|
||||||
!IF "$(CFG)" == "Debug"
|
!IF "$(CFG)" == "Debug"
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
@ -53,7 +54,7 @@ REFDOCDIR=../../../doc/src/sgml/ref
|
|||||||
.c.obj:
|
.c.obj:
|
||||||
$(CPP) -o"$(INTDIR)\$&" $(CPP_PROJ) $<
|
$(CPP) -o"$(INTDIR)\$&" $(CPP_PROJ) $<
|
||||||
|
|
||||||
ALL : sql_help.h "..\..\port\pg_config_paths.h" "$(OUTDIR)\psql.exe"
|
ALL : sql_help.h psqlscan.c "..\..\port\pg_config_paths.h" "$(OUTDIR)\psql.exe"
|
||||||
|
|
||||||
CLEAN :
|
CLEAN :
|
||||||
-@erase "$(INTDIR)\command.obj"
|
-@erase "$(INTDIR)\command.obj"
|
||||||
@ -158,3 +159,6 @@ path.obj : "$(OUTDIR)" ..\..\port\path.c
|
|||||||
|
|
||||||
"sql_help.h": create_help.pl
|
"sql_help.h": create_help.pl
|
||||||
$(PERL) create_help.pl $(REFDOCDIR) $@
|
$(PERL) create_help.pl $(REFDOCDIR) $@
|
||||||
|
|
||||||
|
psqlscan.c : psqlscan.l
|
||||||
|
$(FLEX) -Cfe -opsqlscan.c psqlscan.l
|
||||||
|
@ -8,6 +8,7 @@ NULL=nul
|
|||||||
|
|
||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
PERL=perl.exe
|
PERL=perl.exe
|
||||||
|
FLEX=flex.exe
|
||||||
|
|
||||||
OUTDIR=.\Release
|
OUTDIR=.\Release
|
||||||
INTDIR=.\Release
|
INTDIR=.\Release
|
||||||
@ -16,7 +17,7 @@ REFDOCDIR= ../../../doc/src/sgml/ref
|
|||||||
OutDir=.\Release
|
OutDir=.\Release
|
||||||
# End Custom Macros
|
# End Custom Macros
|
||||||
|
|
||||||
ALL : sql_help.h "..\..\port\pg_config_paths.h" "$(OUTDIR)\psql.exe"
|
ALL : sql_help.h psqlscan.c "..\..\port\pg_config_paths.h" "$(OUTDIR)\psql.exe"
|
||||||
|
|
||||||
CLEAN :
|
CLEAN :
|
||||||
-@erase "$(INTDIR)\command.obj"
|
-@erase "$(INTDIR)\command.obj"
|
||||||
@ -127,5 +128,8 @@ LINK32_OBJS= \
|
|||||||
$(CPP_PROJ) $<
|
$(CPP_PROJ) $<
|
||||||
<<
|
<<
|
||||||
|
|
||||||
sql_help.h: create_help.pl
|
sql_help.h : create_help.pl
|
||||||
$(PERL) create_help.pl $(REFDOCDIR) $@
|
$(PERL) create_help.pl $(REFDOCDIR) $@
|
||||||
|
|
||||||
|
psqlscan.c: psqlscan.l
|
||||||
|
$(FLEX) -Cfe -opsqlscan.c psqlscan.l
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/include/port.h,v 1.61 2004/09/09 14:18:20 momjian Exp $
|
* $PostgreSQL: pgsql/src/include/port.h,v 1.62 2004/09/27 20:37:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -168,6 +168,11 @@ extern int pgrename(const char *from, const char *to);
|
|||||||
extern int pgunlink(const char *path);
|
extern int pgunlink(const char *path);
|
||||||
extern int pgsymlink(const char *oldpath, const char *newpath);
|
extern int pgsymlink(const char *oldpath, const char *newpath);
|
||||||
|
|
||||||
|
/* Include this first so later includes don't see these defines */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <io.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define rename(from, to) pgrename(from, to)
|
#define rename(from, to) pgrename(from, to)
|
||||||
#define unlink(path) pgunlink(path)
|
#define unlink(path) pgunlink(path)
|
||||||
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
|
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
|
||||||
|
Loading…
Reference in New Issue
Block a user