|
From: | Peter Johansson |
Subject: | Re: [automake] Dependency question with _LDADD |
Date: | Wed, 08 Oct 2008 15:25:06 -0400 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080723) |
Michel Briand wrote:
Sorry for the confusion ! Its my faultThat is a big IF. If someone did change the semantics, committed to the repository, that lacking of dependency will be a pain for other developers.I would not have chosen "VERSION" for my variable in Makefile.am since it duplicates one predefined variable (configure). I should have named it "MY_VERSION", or better "TRAINING_PROGRAM_VERSION".... The variable is dynamic. Make will read the file every time. --- # Main program: training # Uses libtraining in ../lib PV=${top_srcdir}/PROGRAM_VERSION export templ=${top_srcdir}/doc/template/version.c.in component=training_program TRAINING_PROGRAM_VERSION=`cat $$PV` internal_version.c: $(PV) ${top_srcdir}/vtempl $(component) \ $(TRAINING_PROGRAM_VERSION) < $(templ) > $@ LIBTRAINING_DIR=../lib AM_CPPFLAGS = -I$(LIBTRAINING_DIR) bin_PROGRAMS = training training_SOURCES = training.c internal_version.c training_LDADD = ../lib/libtraining.la --- I don't really need to depend on vtempl.sh since, if this script respect its basic semantic, we don't mind the implementation changes.
If you don't change the template file, having the dependency doesn't hurt. OTOH if you do change the dependency, you really really wanna have that dependency...The internal_version.c file does contains only the program's version :
Well maybe you don't need it. I usually add that, in case I change something in the build I know I will not miss something. But that is a matter of taste, I guess, how safe you wanna be...I don't see the need for a dependency on Makefile.am, neither. But you maybe have something in mind ?
Cheers, Peter
Cheers, Michel
[Prev in Thread] | Current Thread | [Next in Thread] |