bug-gnu-utils
[Top][All Lists]
Advanced

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

Incorrect propagation of DESTDIR by make


From: Matt Fletcher
Subject: Incorrect propagation of DESTDIR by make
Date: Mon, 13 Nov 2000 08:39:47 -0500 (EST)

Sending both to tar-bugs and the Autoconf folks, since I'm not sure
exactly where the appropriate place to make changes is.  I'll list some
suggestions below.

While compiling gtar (on Solaris 7 running on a SparcStation 5), we found
that setting DESTDIR on the command line did not propagate to the
Makefiles in subdirectories (e.g. doc and src).  We eventually fixed this
by setting DESTDIR as an environment variable and calling make with a -e.
This worked, but seems suboptimal (particularly since we have a nice
utility that automagically determines the correct value for DESTDIR and
adds it to the command line :).

Some possible changes that could help us:

1.  Change Autoconf so that it invokes make with a DESTDIR=$(DESTDIR) when
calling make in subdirectories.  

2.  If 1 is undesirable as a general solution for some reason, add an
option to Autoconf that we could set that would produce that behavior. 

3.  If both 1 and 2 are undesirable, add an option to the basic configure
script that allows one to set DESTDIR at configure time (e.g. configure
--destdir=DESTDIR).  I don't like this much better than setting the
environment variable, but it would have worked (and is easier to
document).

4.  If there are issues that make changing the way Autoconf works
impossible, perhaps the Makefile template could change so that those
subMakefiles that need DESTDIR could have it defined for them (by adding
DESTDIR=$DESTDIR to the command line or whatever).

I would think that option 1 is the best, since it solves the propagation
problem in general (obviously, this kind of problem exists in other
software packages that have makefiles in subdirectories as well) and
should be transparent to those compiling the software.  Further, this
makes multi-directory packages work the same as single directory packages
(from the perspective of the person compiling the package). Of course,
there may be something I'm not considering that would make this
unadvisable. 

Regardless, thanks for your help,
Matt

 -- 
========================================================================
Matt Fletcher
Systems/Programmer
University of Pittsburgh






reply via email to

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