The automake docs recommend:

do_subst = sed -e 's,[...@]datadir[@],$(datadir),g' \
                 -e 's,[...@]perl[@],$(PERL),g' \
                 -e 's,[...@]package[@],$(PACKAGE),g' \
                 -e 's,[...@]version[@],$(VERSION),g' \
                 ...

automake: automake.in Makefile
     $(do_subst) < $(srcdir)/automake.in > automake
     chmod +x automake


However, if you do that, then the following breaks:

./configure --prefix=/config/prefix
make prefix=/all/prefix all
make prefix=/install/prefix install

because the files insalled to /install/prefix/bin
were made to be installed in /all/prefix.  The
files have a dependency on the value of make
variables.  Is the above sequence considered
a user error?  If the user wants to maintain a build
directory which is used to install to different
locations, must the user always do:

make clean prefix=/local install
make clean prefix=/network install

The other option is to have to separately configured
build directories.  Neither option is very satisfying.
Would it be feasible to have automake syntax to
indicate a dependency on a variable? Perhaps
by dumping the values of the variables to a
stamp file or something along those lines.  That
seems a very fragile solution...or is there
already a different solution?


-- 
William Pursell


Reply via email to