automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hard coded paths


From: William Pursell
Subject: hard coded paths
Date: Wed, 24 Dec 2008 07:41:35 +0000
User-agent: Thunderbird 2.0.0.18 (Macintosh/20081105)

The automake docs recommend:

do_subst = sed -e 's,address@hidden@],$(datadir),g' \
                 -e 's,address@hidden@],$(PERL),g' \
                 -e 's,address@hidden@],$(PACKAGE),g' \
                 -e 's,address@hidden@],$(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

[Prev in Thread] Current Thread [Next in Thread]