On 21 Sep, 14:06, augustk <fusionf...@gmail.com> wrote: > With the option `header-file', FLEX can create a header file, lex.h, > from the LEX specification, lex.l. What I don't know, however, is > where I should put this option in the context of Autoconf/Automake. > Any clues?
Adding the following lines to Makefile.am seems to do the trick: BUILT_SOURCES = lex.h CLEANFILES = lex.h lex.h: lex.l $(LEX) --header-file=$@ -o /dev/null $< I think it should be possible to get the same result with the more concise AM_LFLAGS = --header-file=lex.h -o /dev/null lex.l but that doesn't work for me.