1 #-------------------------------------------------------------------------
5 # src/backend/parser/Makefile
7 #-------------------------------------------------------------------------
9 subdir
= src
/backend
/parser
10 top_builddir
= ..
/..
/..
11 include $(top_builddir
)/src
/Makefile.global
13 override CPPFLAGS
:= -I.
-I
$(srcdir) $(CPPFLAGS
)
39 include $(top_srcdir
)/src
/backend
/common.mk
42 # There is no correct way to write a rule that generates two files.
43 # Rules with two targets don't have that meaning, they are merely
44 # shorthand for two otherwise separate rules. If we have an action
45 # that in fact generates two or more files, we must choose one of them
46 # as primary and show it as the action's output, then make all of the
47 # other output files dependent on the primary, like this. Furthermore,
48 # the "touch" action is essential, because it ensures that gram.h is
49 # marked as newer than (or at least no older than) gram.c. Without that,
50 # make is likely to try to rebuild gram.h in subsequent runs, which causes
51 # failures in VPATH builds from tarballs.
56 gram.c
: BISONFLAGS
+= -d
57 gram.c
: BISON_CHECK_CMD
= $(PERL
) $(srcdir)/check_keywords.pl
$< $(top_srcdir
)/src
/include/parser
/kwlist.h
60 scan.c
: FLEXFLAGS
= -CF
-p
-p
61 scan.c
: FLEX_NO_BACKUP
=yes
64 # Force these dependencies to be known even without dependency info built:
65 gram.o scan.o parser.o
: gram.h