You are not logged in.
Pages: 1
I'm building a linux system within a running one. The work in progress is mounted on /mnt/cf, and I just compiled bash and I want to install it to /mnt/cf instead of / with a make install. What flags would I use to do this?
Offline
./configure --prefix=/mnt/cf/usr
make
make install
Offline
it's probably a a better idea to change the make prefix ,, the configure is usually there to sort out where the programs looks for stuff
so
make DESTDIR=/mnt/cf install
or
make [prefix|PREFIX]=/mnt/cf install
the first is used in most apps ive come accross but are few are stubborn and doesn't follow the convention as i see it
Offline
No, the --prefix option to configure sets the installation target path, and is the Right Way (tm) to mess with said path. Among other circumstances, the "make DESTDIR=/mnt/cf install" solution fails when the compilation itself uses the install path as a parameter (such as the case where shared files are expected in $PREFIX/share or configuration is expected in $PREFIX/etc).
Offline
But the program run on the new system will not have a /mnt/cf prefix.
When you compile it like that, it will only work if it doesn't need any external resources, afaik.
So ./configure --prefix=/usr
make
make DESTDIR=/mnt/cd/usr install
Like the PKGBUILDs do it, right?
Last edited by Gilneas (2007-11-10 22:51:59)
Offline
Duh, good point. I had forgotten that he was installing to an alternate root as opposed to just an alternate path.
Offline
A+
I'm getting down to business right now, thanks a million guys!
Offline
Use the Linux From Scratch book for all the hints you need to do this...
Offline
Nice, LFS is a great book. I remember it being overly complicated years ago, now I skip through chapters ... funny how that happens!
Offline
Pages: 1