Mike Tegtmeyer <[EMAIL PROTECTED]> writes: > I'd like to report a possible bug/limitation in automake and it's use > with flex. It seems that ylwrap strips out or otherwise does not > recognize the --header-file=foo.h option provided in AM_LFLAGS. My > successful useage under 1.9 has been (obviously since ylwrap was not > called due to there only being one parser): > > BUILT_SOURCES = grammar.h > > AM_YFLAGS = -d -p foo_parser_ > > AM_LFLAGS= -Pfoo_parser_ -olex.yy.c --header-file=rules.h > > foo_SOURCES = \ > rules.ll \ > grammar.yy > > make... > > /bin/sh ../config/ylwrap rules.ll lex.yy.c rules.cc -- flex - > Ppass_parser_ -olex.yy.c --header-file=rules.h > ... > grammar.yy:15:21: error: rules.h: No such file or directory > > Is this a bug? Or am i using automake incorrectly here?
Yeah, it is IMHO. I `fixed' it locally here, mimicking yacc.am, diff below. Sebastian diff --git a/lib/am/lex.am b/lib/am/lex.am index b44daf1..1c8654f 100644 --- a/lib/am/lex.am +++ b/lib/am/lex.am @@ -23,7 +23,7 @@ endif %?MAINTAINER-MODE% ?GENERIC?%EXT%%DERIVED-EXT%: ?!GENERIC?%OBJ%: %SOURCE% -?GENERIC? $(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE% +?GENERIC? $(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% $(LEX_OUTPUT_ROOT).h %BASE%.h -- %COMPILE% ?!GENERIC??DIST_SOURCE? $(am__skiplex) \ ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%. -?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE% +?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% $(LEX_OUTPUT_ROOT).h %BASE%.h -- %COMPILE%
