]> granicus.if.org Git - postgresql/blobdiff - src/backend/bootstrap/Makefile
Removed MBFLAGS from makefiles since it's now done in include/config.h.
[postgresql] / src / backend / bootstrap / Makefile
index abd306afdf51e0ceae2a83c3e046c21c6393a109..b9f9270416e35e219adb5d7f3495fe9d50d1d100 100644 (file)
@@ -4,7 +4,7 @@
 #    Makefile for the bootstrap module
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.8 1997/04/18 08:55:55 vadim Exp $
+#    $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.21 2000/01/19 02:58:51 petere Exp $
 #
 #
 # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
 SRCDIR= ../..
 include ../../Makefile.global
 
-INCLUDE_OPT= -I.. \
-             -I../port/$(PORTNAME) \
-             -I../../include
-
-CFLAGS+= $(INCLUDE_OPT)  
+CFLAGS += -I..
 
 ifeq ($(CC), gcc)
 CFLAGS+= -Wno-error
@@ -34,11 +30,19 @@ endif
 BOOTYACCS= bootstrap_tokens.h bootparse.c
 
 OBJS= bootparse.o bootscanner.o bootstrap.o 
+ifeq ($(PORTNAME), qnx4)
+# wlink currently crashes with bootstrap.o
+OBJS1= bootparse.o bootscanner.o
+endif
 
 all: SUBSYS.o
 
 SUBSYS.o: $(OBJS)
-       ld -r -o SUBSYS.o $(OBJS)
+ifneq ($(PORTNAME), qnx4)
+       $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
+else
+       $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS1)
+endif
 
 # bootstrap.o's dependency on bootstrap_tokens.h is computed by the
 # make depend, but we state it here explicitly anyway because 
@@ -49,24 +53,26 @@ 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
+       rm -f SUBSYS.o $(OBJS)
 # And the garbage that might have been left behind by partial build:
        rm -f y.tab.h y.tab.c y.output lex.yy.c
 
 # 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