开发者

Directory for files generated by Make during installation from configure, make and make install

Just assume we are installing some libraries from its source distributed by the way GNU promoted. When using "./configure --prefix" to specify where to install.

(1) does Make generate the binaries under the current directory? Does Make install then copies them from the current directory开发者_如何学Python (which is from where Make is run) to $prefix? If the answers are yes, I have two questions, each for different cases.

(2) when the current directory and $prefix are not the same, can I remove all the files generated by Make under current directories to save some space?

(3) when the current directory and $prefix are the same, will make install do nothing or copy the files to themselves? Can I just skip the make install step?


The answer to your first question is probably yes.

As for the rest, you may find a make clean which will tidy up the files created by the initial make.

I think the makefile will be able to handle the situation where current directory and $prefix are not the same, and do the right thing.

The current directory would not usually be the destination of files created by makefiles.

(of course it depends on how the makefile is written, so I can't give definite answers, but I've generally been impressed with the makefiles I've used)


  1. You are absolutely right: make just creates files in current directory and make install copies it to the destination directories, based on $prefix and other variables maintained by configure script.

  2. You can wipe out the whole directory you've ran the build at. It will not be used, because, well, that's what "install" means: you build in one directory and the the files are placed in the proper places of your system.

  3. Usually install destination and the directory you build in differ. The hierarchy of the files being installed usually do not relate to directory hierarchy of the build system. Just install to the other dir: it's cheap to create just yet another directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜