Can I just simply use ./configure --prefix=/usr/local/stow/package when the target directory is /usr/local?

weakish jiang <[email protected]> Wed, 4 Feb 2009 18:55:27 +0800
Newsgroups gmane.comp.gnu.stow.general
Message-ID <[email protected]>
My stow tree is /usr/local/stow and the target directory is /usr/local
(the default value).

And I use stow to install a program:

   # tar -zxvf app-1.4.tar.gz
   # cd app-1.4
   # ./configure --prefix=/usr/local/stow/app-1.4
   # make
   # make install

But according to stow manual section '6.1 Compile-time and
install-time'[1], this can cause
problems.  If, say,  there is another package
/usr/local/stow/app-1.4-extra, since I use '/configure
--prefix=/usr/local/stow/app-1.4' (the compile-time and install-time
location is /usr/local/stow/app-1.4),  app-1.4 will usually find files
of app-1.4-extra
in /usr/local/stow/app-1.4 and fail.

Thus the manual recommends to use ./configure --prefix=/usr/local/ and
make install --prefix=/usr/loca/stow/app-1.4 instead.  But another
problem arise:
some programs can not understand separate run-time and install-time location.
In this case, things become tricky.  Sometimes we need to 'make -n install',
edit the output script, then run it manually in the place of 'make install'.

My question is, if I keep using /usr/local/ as the target directory,
can I just simply use the
first procedure?  Although app-1.4 will not find files of app-1.4-extra in
/usr/local/stow/app-1.4, but I guess it will not fail.  Since
/usr/local is quite a
standard place, it is most likely app-1.4 will then try to find the
files of app-1.4-extra
in /usr/local anyway.

[1]http://www.gnu.org/software/stow/manual.html#SEC6