化妆的DESTDIR和preFIX [英] DESTDIR and PREFIX of make

查看:279
本文介绍了化妆的DESTDIR和preFIX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让软件安装到特定目录。我发现了几个办法,但不知道什么是它们之间的区别。

I am trying to make software install to a specific directory. I found several ways, but not sure what are the differences between them.


  1. ./配置 - preFIX =的 *

  2. 请安装 - preFIX =的 *

  3. 请安装DESTDIR =的 *

  1. ./configure --prefix=*
  2. make install --prefix=*
  3. make install DESTDIR=*

我感到困惑这三者的功能。难道他们达到同样的目的?谢谢你。

I am confused about the functions of these three. Do they achieve the same goal? Thanks.

推荐答案

2号简直就是一个错误,据我知道的。

Number 2 is simply an error as far as I know.

1号决定了在安装时包会,并在会寻找它的相关文件在运行时。这是如果你只是编译东西使用一台主机上,你应该使用什么。

Number 1 determines where the package will go when it is installed, and where it will look for its associated files when it is run. It's what you should use if you're just compiling something for use on a single host.

号3为安装到未其中包将被从运行一个临时目录。例如建立的deb 包时,这是使用。建立包的人实际上并没有安装的一切到它自己的系统上的最后的地方。他可能安装了不同的版本,并已经不想打扰它,否则他可能甚至不根源。于是,他用配置 - preFIX =的/ usr所以程序将希望被安装在/ usr运行时,然后进行安装DESTDIR =的debian / tmp目录实际创建的目录结构

Number 3 is for installing to a temporary directory which is not where the package will be run from. For example this is used when building deb packages. The person building the package doesn't actually install everything into its final place on his own system. He may have a different version installed already and not want to disturb it, or he may not even be root. So he uses configure --prefix=/usr so the program will expect to be installed in /usr when it runs, then make install DESTDIR=debian/tmp to actually create the directory structure.

这篇关于化妆的DESTDIR和preFIX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆