[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Built sources and make distcheck
From: |
Tavian Barnes |
Subject: |
Built sources and make distcheck |
Date: |
Sun, 22 Feb 2009 22:22:12 -0700 |
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
- Built sources and make distcheck,
Tavian Barnes <=