1 #-------------------------------------------------------------------------
3 # Makefile for the bootstrap module
5 # $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.34 2006/03/07 01:03:12 tgl Exp $
7 #-------------------------------------------------------------------------
9 subdir = src/backend/bootstrap
10 top_builddir = ../../..
11 include $(top_builddir)/src/Makefile.global
13 override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
15 OBJS= bootparse.o bootstrap.o
20 $(LD) $(LDREL) $(LDOUT) $@ $^
23 # bootscanner is compiled as part of bootparse
24 bootparse.o: $(srcdir)/bootscanner.c
26 # See notes in src/backend/parser/Makefile about the following two rules
28 $(srcdir)/bootparse.c: $(srcdir)/bootstrap_tokens.h ;
30 $(srcdir)/bootstrap_tokens.h: bootparse.y
32 $(YACC) -d $(YFLAGS) $<
33 mv -f y.tab.c $(srcdir)/bootparse.c
34 mv -f y.tab.h $(srcdir)/bootstrap_tokens.h
36 @$(missing) bison $< $@
39 $(srcdir)/bootscanner.c: bootscanner.l
41 $(FLEX) $(FLEXFLAGS) -o'$@' $<
43 @$(missing) flex $< $@
46 # Force these dependencies to be known even without dependency info built:
47 bootstrap.o bootparse.o: $(srcdir)/bootstrap_tokens.h
50 # bootparse.c, bootstrap_tokens.h, and bootscanner.c are in the distribution
51 # tarball, so they are not cleaned here.
53 rm -f SUBSYS.o $(OBJS)
54 # And the garbage that might have been left behind by partial build:
55 @rm -f y.tab.h y.tab.c y.output lex.yy.c
58 # This is unusual: We actually have to build some of the parts before
59 # we know what the header file dependencies are.
60 dep depend: bootparse.c bootscanner.c bootstrap_tokens.h
61 $(CC) -MM $(CFLAGS) *.c >depend
63 ifeq (depend,$(wildcard depend))