Hello, On Wed, Nov 08, 2006 at 10:00:45AM -0500, Jeff Safier wrote: > We have a message parser that generates a header file which > is included in the actual source file.
then you have to write a standard make rule for the header. The rule will get copied from Makefile.am to Makefile.in and Makefile, as discussed in the other thread. To ensure that the header is generated before the build starts, add it to BUILT_SOURCES. An example: foo.h: foo.input message_parser foo.input >$@ BUILT_SOURCES = foo.h See also http://sources.redhat.com/automake/automake.html#Sources In the other thread, On Wed, Nov 08, 2006 at 10:13:12AM -0500, Pat Suwalski suggested: > main.c: generatedheader.h to ensure that the header gets built. But this is not healthy: First, if main.c is not touched, it will stay older than the header, and thus generatedheader.h, main.o, and the application will be rebuilt on a subsequent run of `make', eg. during `sudo make install'. Second, I suppose that main.c is distributed and generatedheader.h is not. But distributed files are not allowed to depend on non-distributed ones. In short, do not do this. Have a nice day, Stepan Kasal