I have a project which auto-generates some look-up tables when checked out from its SCM, and are distributed in the tarballs. These tables used to be made by shell scripts called from autogen.sh, but I recently ported them to C for a massive speed improvement. I've implemented the Makefile.am like this:
EXTRA_PROGRAMS = generate generate_SOURCES = generate.c generated.c: generate ./generate$(EXEEXT) >$@ bin_PROGRAMS = lookup lookup_SOURCES = lookup.c generated.c This is almost right, but because generated.c gets distributed but `generate' doesn't, make sees generated.c as out-of-date in the tarballs, and re-builds it. This is worse when `make distcheck' is run, because of the VPATH build; $@ isn't even the right location to write to, and the source directory is read-only anyway, so a qualified path wouldn't help. Is there any way to not build the `generate' target if generated.c exists, but still build it when it doesn't? Thanks, -- Tavian Barnes