]> granicus.if.org Git - postgresql/blobdiff - src/backend/bootstrap/Makefile
From: t-ishii@sra.co.jp
[postgresql] / src / backend / bootstrap / Makefile
index 66ed86f3c5259eeb9d06bd4447682c2a2276d89e..ccf8f46a242857e2722f98021acdb1e179be83a7 100644 (file)
@@ -4,7 +4,7 @@
 #    Makefile for the bootstrap module
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.1 1996/10/27 09:46:59 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.15 1998/07/26 04:30:17 scrappy Exp $
 #
 #
 # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
 #
 #-------------------------------------------------------------------------
 
-SRCDIR = ../..
+SRCDIR= ../..
 include ../../Makefile.global
 
-INCLUDE_OPT = -I.. \
-              -I../port/$(PORTNAME) \
-              -I../include \
-              -I../../include
+CFLAGS += -I..
+ifdef MULTIBYTE
+CFLAGS+= $(MBFLAGS)
+endif
 
-CFLAGS += $(INCLUDE_OPT)
+ifeq ($(CC), gcc)
+CFLAGS+= -Wno-error
+endif
 
-BOOTYACCS = bootstrap_tokens.h bootparse.c
+BOOTYACCS= bootstrap_tokens.h bootparse.c
 
-OBJS = bootparse.o bootscanner.o bootstrap.o 
+OBJS= bootparse.o bootscanner.o bootstrap.o 
 
 all: SUBSYS.o
 
 SUBSYS.o: $(OBJS)
-       ld -r -o SUBSYS.o $(OBJS)
+       $(LD) -r -o SUBSYS.o $(OBJS)
 
 # bootstrap.o's dependency on bootstrap_tokens.h is computed by the
 # make depend, but we state it here explicitly anyway because 
@@ -46,14 +48,16 @@ bootstrap.o: bootstrap_tokens.h
 
 bootstrap_tokens.h bootparse.c: bootparse.y
        $(YACC) $(YFLAGS) $<
-       sed -f boot.sed < y.tab.c > bootparse.c
+       grep -v "^#" boot.sed > sedfile
+       sed -f sedfile < y.tab.c > bootparse.c
        mv y.tab.h bootstrap_tokens.h
-       rm -f y.tab.c
+       rm -f y.tab.c sedfile
 
 bootscanner.c: bootscanner.l
        $(LEX) $<
-       sed -f boot.sed < lex.yy.c > bootscanner.c
-       rm -f lex.yy.c
+       grep -v "^#" boot.sed > sedfile
+       sed -f sedfile < lex.yy.c > bootscanner.c
+       rm -f lex.yy.c sedfile
 
 clean:
        rm -f SUBSYS.o $(OBJS) bootparse.c bootstrap_tokens.h bootscanner.c
@@ -62,8 +66,8 @@ clean:
 
 # This is unusual:  We actually have to build some of the parts before
 # we know what the header file dependencies are.  
-dep: bootparse.c bootscanner.c bootstrap_tokens.h
-       $(CC) -MM $(INCLUDE_OPT) *.c >depend
+dep depend: bootparse.c bootscanner.c bootstrap_tokens.h
+       $(CC) -MM $(CFLAGS) *.c >depend
 
 ifeq (depend,$(wildcard depend))
 include depend