[OpenAFS-devel] [PATCH] handle nesting of vars in configure.in properly

Derek Atkins warlord@MIT.EDU
09 Oct 2001 11:07:54 -0400


Sam Hartman <hartmans@mekinok.com> writes:

> DESTDIR is by far more correct, as it has semantics that are clearly
> defined to only affect installation.  If you make install and change
> some of the prefix variables, the package could for example expect to
> run out of the directory you specified at make install time in some
> strange ways.

I second this notion.  Don't forget that 'make install' usually
implies 'make all' and all that entails.  Indeed, the OpenAFS tree
_does_ wind up rebuilding some packages during the install process
(especially if you run it a second time from 'make all).  If you wind
up changing sysconfdir during the install, you have a non-zero chance
that some application will be re-built using the WRONG sysconfdir.

If you use DESTDIR, as Derrick and Sam have both suggested (and is
really the FSF defined mechanism to modify the install-root) then you
don't have to worry about this problem, and you DO get the semantics
you want.

./configure --sysconfdir=/etc --with-linux-kernel-headers=/usr/src/linux-2.4.3
make all
make DESTDIR=/var/tmp/openafs-root install

Also, keep in mind that using DESTDIR will affect _all_ install
destinations, not just sysconfdir.  That way you can get a complete
install tree in an alternate location (which is what you want for
packaging).

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available