LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Choose target directory upon "make install" (https://www.linuxquestions.org/questions/linux-general-1/choose-target-directory-upon-make-install-909337/)

Ornithological Ornod 10-21-2011 07:55 AM

Choose target directory upon "make install"
 
Is it possible to choose the target directory upon make install after running

./configure
make -s


I cannot install into /usr/local since I only have an account on a server. I am trying to compile and install the Poco C++ libraries.

Thx in advance.

mjax09 10-21-2011 08:12 AM

Sorry! buddy but I do not think there is.However it is not that much of a big deal you can do a:

:$make distclean

this removes all your makefiles generated by your first ./configure and assigned to the initial --prefix=/path/to/prefix in your case, this being /usr/local.Now after you have done this you must do a new configure and set a directory you have permissions to, like:

:$./configure --prefix=/home/homedir/progname
:$make
:$make install

This means that when you run make install, all your libs and bins will be placed in the progname directory in your home folder, beware though you must never delete the progname folder or else your programme is gone.My personal advice, use prefix like this :
$:./configure --prefix=/home/homedir/.progname
Not 100% sure it will work but with the full-stop at the beginning of the folder name it effectively becomes a hidden folder, you therefore never need to worry about deleting it, you won't even see it.

Hope this helps.


Old saying : "The best things in life a free"
Old saying updated :"The best things in life are open source"

crts 10-21-2011 08:16 AM

Hi,

normally you choose the install directory during the configuration step:
Code:

./configure --prefix=/path/to/install/dir

theNbomr 10-21-2011 09:08 AM

The usual autotools-generated configure script supports the --help option:
Code:

./configure --help
This generally results in a section of helpful options with the headings "Installation directories" and "Fine tuning of the installation directories". In that list of options you will probably be able to find one or more that meets your requirements.

--- rod.

Ornithological Ornod 10-21-2011 12:07 PM

Yes, using

Code:

./configure --prefix=/some/directory
turned out to be very helpful indeed. Thanks everyone.


All times are GMT -5. The time now is 01:47 AM.