简体   繁体   English

Linux configure / make, - prefix?

[英]Linux configure/make, --prefix?

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. 我正在尝试configuremake并将Xfce make install到我的buildroot构建目录中。 When configuring I'm using 配置我正在使用时

--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? 如何设置要构建的文件夹,并为配置文件设置不同的根目录?

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. 通过标准, --prefix覆盖所有的人,所以你需要指定前缀之后,将覆盖配置位置。 This course of actions usually works for every automake-based project. 此过程通常适用于每个基于automake的项目。

The worse case scenario is when you need to modify the configure script, or even worse, generated makefiles and config.h headers. 更糟糕的情况是需要修改配置脚本,甚至更糟的是生成makefile和config.h头文件。 But yeah, for Xfce you can try something like this: 但是,对于Xfce你可以尝试这样的事情:

./configure --prefix=/home/me/somefolder/mybuild/output/target --sysconfdir=/etc 

I believe that should do it. 我相信应该这样做。

In my situation, --prefix= failed to update the path correctly under some warnings or failures. 在我的情况下, - prefix =在某些警告或失败时无法正确更新路径。 please see the below link for the answer. 请参阅以下链接以获得答案。 https://stackoverflow.com/a/50208379/1283198 https://stackoverflow.com/a/50208379/1283198

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM