Linux 配置/制作,--prefix?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8902698/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Linux configure/make, --prefix?
提问by Xleedos
Bear with me, this one's not very easy to explain...
忍一忍,这个不太好解释……
I'm trying to configure
, make
and make install
Xfce into my buildroot build directory. When configuring I'm using
我想configure
,make
和make install
Xfce的到我的buildroot的build目录。配置时我正在使用
--prefix=/home/me/somefolder/mybuild/output/target
so that it builds to the right folder, however when it's compressed and run I get errors from various config files where it's looking for files in
以便它构建到正确的文件夹,但是当它被压缩并运行时,我从各种配置文件中得到错误,它在其中查找文件
/home/me/somefolder/mybuild/output/target
(which of course doesn't exist.)
(这当然不存在。)
How do I set what folder to build into, yet set a different root directory for the config files to use?
如何设置要构建到的文件夹,同时为要使用的配置文件设置不同的根目录?
采纳答案by Xleedos
Do configure --help
and see what other options are available.
做configure --help
看看还有哪些其他选项可用。
It is very common to provide different options to override different locations. By standard, --prefix
overrides all of them, so you need to override config location after specifying the prefix. This course of actions usually works for every automake-based project.
提供不同的选项来覆盖不同的位置是很常见的。按照标准,--prefix
覆盖所有这些,因此您需要在指定前缀后覆盖配置位置。此操作过程通常适用于每个基于 automake 的项目。
The worse case scenario is when you need to modify the configure script, or even worse, generated makefiles and config.h headers. But yeah, for Xfce you can try something like this:
更糟糕的情况是当您需要修改配置脚本时,或者更糟的是,需要修改生成的 makefile 和 config.h 头文件。但是,是的,对于 Xfce,您可以尝试这样的操作:
./configure --prefix=/home/me/somefolder/mybuild/output/target --sysconfdir=/etc
I believe that should do it.
我相信应该这样做。
回答by Prasaathviki
In my situation, --prefix= failed to update the path correctly under some warnings or failures. please see the below link for the answer. https://stackoverflow.com/a/50208379/1283198
在我的情况下,--prefix= 无法在某些警告或失败下正确更新路径。请参阅以下链接以获取答案。 https://stackoverflow.com/a/50208379/1283198