diff --git a/tests/Makefile.am b/tests/Makefile.am index 91ca5690d..039690d34 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -322,10 +322,14 @@ TESTOPTS = -L FLEX = $(top_builddir)/src/flex -.l.c: $(FLEX) +.l.c: + +%.c: %.l $(FLEX) $(AM_V_LEX)$(FLEX) $(TESTOPTS) -o $@ $< -.ll.cc: $(FLEX) +.ll.cc: + +%.cc: %.ll $(FLEX) $(AM_V_LEX)$(FLEX) $(TESTOPTS) -+ -o $@ $< #want line numbers, so override the default rule @@ -359,7 +363,9 @@ bison_yylval_scanner.h: bison_yylval_scanner.c # automake does not support compiling flex scanners output in C as C++ # so we explicitly sayhow, using the .lll suffix for the lex input file -.lll.cc: $(FLEX) +.lll.cc: + +%.cc: %.lll $(FLEX) $(AM_V_LEX)$(FLEX) $(TESTOPTS) -o $@ $< header_nr_main.$(OBJEXT): header_nr_scanner.h @@ -400,11 +406,15 @@ top.h: top.c # Build rules for non-C back ends .l.go: + +%.go: %.l $(FLEX) $(AM_V_LEX)$(FLEX) $(TESTOPTS) -o $@ $< # This is a temporary fake rule for use while the Go back end still # actually generates C. .go: + +%.o: %.go $(CC) $< -o $*_go # Most test productions can be autogenerated from ruleset files, but