> -----Original Message-----
> From: Akim Demaille [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 19, 2000 5:04 PM
> To: [EMAIL PROTECTED]
> Cc: Thomas E. Dickey; Mo DeJong; [EMAIL PROTECTED]
> Subject: Re: Why does ./configure not set prefix and exec_prefix?
> 
> 
> 
> | > IOW, what's the point of being able to change prefix at make time?
> | > Why not just at configure?
> | > 
> | 
> | How about the scenario of:
> | 
> | configure --prefix=/usr
> | make all
> | make install prefix=/usr/stow/mypackage.mj.mn.p
> | cd /usr/stow
> | stow mypackage.mj.mn.p
> 
> I didn't know stow would rely on this.  But still, it seems dangerous
> to me: why don't you ./configure --prefix=/usr/stow/mypackage.mj.mn.p
> in order to be sure that the hard coded paths are right?

Just because the right hard-coded paths ARE /usr/subdir/path, and NOT
/usr/stow/mypackage.mj.mn.p/subdir/path; the whole point is packaging the
application: I ALWAYS use "make install
prefix=/my/packaging/directory/for/this/application", then build installers
from the content of /my/packaging/directory/for/this/application that will
install this application under the normal /usr/local prefix.

What I agree with you is that usually we should not have to set prefix for
"make all", but it is very useful for "make install" and the wanted result
could NOT be obtained by re-configuring, as this will change the hard-coded
paths.

> 
> | configure                  (prefix=/usr/local)
> | make prefix=/usr           (user Foo always does it this way)
> | make install
> | 
> | I may want to test an installation and want to build with a 
> different prefix
> | than what it was configured with.
> 
> But again, I know the goal.  I just say that it is difficult to make
> it right, so you cannot expect the package to behave correctly.
> 
> The reason why you can't depend upon this is that somewhere, IMHO, it
> is just wrong to expect make prefix=/foo to work properly.  Specifying
> prefix etc. is a job for configure, not make.
> 

You should be more precise; I agree that "make all prefix=/foo" may not work
as expected; however "make install prefix=/foo" MUST work as expected, i.e.
install in /foo something that to be executed should be "moved" in
/usr/local or whatever the prefix was set by ./configure. 

Note that when saying "moved" above this may mean physically moving or just
changing a symbolic link or some NFS mount... For example I may always
configure a package with --prefix=/usr/local/my_package, build it normally,
then install by "make prefix=/usr/local/packages/my_package-2.7.1 install",
so that I can switch from one version to the other just by "rm -f
/usr/local/my_package; ln -s /usr/local/packages/my_package-2.7.1
/usr/local/my_package" (something that will probably be done by some
administrative shell script).

In fact one may even arrange so that several versions of a package are
installed this way and that each user may choose which version he wants to
use (although this is a bit more tricky).

Just my 2 cents,

        Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ing�ni�rie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:    +33 (0) 1 47 68 80 80
Fax:    +33 (0) 1 47 88 97 85
e-mail: [EMAIL PROTECTED]
                [EMAIL PROTECTED]
-------------------------------------------- 

Reply via email to