Store GNU files in other places

How can I store GNU make and configure files elsewhere? I have a project I'm working on that I compiled using:

./configure --prefix=/usr && make && su -c 'make install'

The thing is, I don’t want to pollute the current folder, which is the svn / git / hg / whatever sandbox with the files generated by this command. I want to place these files in a separate place. I don’t know if this is similar, but when I compile the linux kernel from the source code, I can specify where to put the output by passing the “O” parameter to “make”, something like this:

make O=/home/user/linux-output
+3
source share
2 answers

The Makefile must support this feature.

, make , autoconf, :

mkdir ../build
cd ../build
../configure --prefix=/usr
make
make install

(, gcc).

+8

, GNU autotools configure.

, Makefile .

, .

script, work_copy, script .. work_copy, . , .

, .

+1

Source: https://habr.com/ru/post/1715702/


All Articles