2
2
#
3
3
# Makefile for the bootstrap module
4
4
#
5
- # $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.33 2006/01/05 01:56:29 momjian Exp $
5
+ # $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.34 2006/03/07 01:03:12 tgl Exp $
6
6
#
7
7
# -------------------------------------------------------------------------
8
8
@@ -20,43 +20,37 @@ SUBSYS.o: $(OBJS)
20
20
$(LD ) $(LDREL ) $(LDOUT ) $@ $^
21
21
22
22
23
- bootstrap.o bootparse.o :$(srcdir ) /bootstrap_tokens.h
24
-
25
23
# bootscanner is compiled as part of bootparse
26
24
bootparse.o :$(srcdir ) /bootscanner.c
27
25
28
- # `sed' rules to remove conflicts between bootstrap scanner and parser
29
- # and the SQL scanner and parser. For correctness' sake the rules that
30
- # use this must depend on this Makefile.
31
- define sed-magic
32
- sed -e 's/^yy/Int_yy/g' \
33
- -e 's/\([^a-zA-Z0-9_]\)yy/\1Int_yy/g'
34
- endef
35
-
26
+ # See notes in src/backend/parser/Makefile about the following two rules
36
27
37
28
$(srcdir ) /bootparse.c :$(srcdir ) /bootstrap_tokens.h ;
38
29
39
- $(srcdir ) /bootstrap_tokens.h : bootparse.y Makefile
30
+ $(srcdir ) /bootstrap_tokens.h : bootparse.y
40
31
ifdef YACC
41
32
$(YACC) -d $(YFLAGS) $<
42
- $(sed-magic) < y.tab.c > $(srcdir)/bootparse.c
43
- $(sed-magic) < y.tab.h > $(srcdir)/bootstrap_tokens.h
44
- rm -f y.tab.c y.tab.h
33
+ mv -f y.tab.c $(srcdir)/bootparse.c
34
+ mv -f y.tab.h $(srcdir)/bootstrap_tokens.h
45
35
else
46
36
@$(missing) bison $< $@
47
37
endif
48
38
49
- $(srcdir ) /bootscanner.c : bootscanner.l Makefile
39
+ $(srcdir ) /bootscanner.c : bootscanner.l
50
40
ifdef FLEX
51
- $(FLEX) $(FLEXFLAGS) $<
52
- $(sed-magic) lex.yy.c > $@
53
- rm -f lex.yy.c
41
+ $(FLEX) $(FLEXFLAGS) -o'$@' $<
54
42
else
55
43
@$(missing) flex $< $@
56
44
endif
57
45
46
+ # Force these dependencies to be known even without dependency info built:
47
+ bootstrap.o bootparse.o :$(srcdir ) /bootstrap_tokens.h
48
+
49
+
50
+ # bootparse.c, bootstrap_tokens.h, and bootscanner.c are in the distribution
51
+ # tarball, so they are not cleaned here.
58
52
clean :
59
- rm -f SUBSYS.o$(OBJS ) bootstrap.o
53
+ rm -f SUBSYS.o$(OBJS )
60
54
# And the garbage that might have been left behind by partial build:
61
55
@rm -f y.tab.h y.tab.c y.output lex.yy.c
62
56