summaryrefslogtreecommitdiff
path: root/src/Makefile.global.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.global.in')
-rw-r--r--src/Makefile.global.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 000bfd772a..fbaaaf995b 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -500,6 +500,22 @@ TAS = @TAS@
#
# Global targets and rules
+%.c: %.l
+ifdef FLEX
+ $(FLEX) $(if $(FLEX_NO_BACKUP),-b) $(FLEXFLAGS) -o'$@' $<
+ @$(if $(FLEX_NO_BACKUP),if [ `wc -l <lex.backup` -eq 1 ]; then rm lex.backup; else echo "Scanner requires backup; see lex.backup." 1>&2; exit 1; fi)
+else
+ @$(missing) flex $< '$@'
+endif
+
+%.c: %.y
+ $(if $(BISON_CHECK_CMD),$(BISON_CHECK_CMD))
+ifdef BISON
+ $(BISON) $(BISONFLAGS) -o $@ $<
+else
+ @$(missing) bison $< $@
+endif
+
%.i: %.c
$(CPP) $(CPPFLAGS) -o $@ $<