“make install”vs“Make install clean”?

时间:2011-12-18 21:44:09

标签: linux unix installation makefile

在* nix中,当我编译软件时,我该怎么做:

# make install

VS

# make install clean

1 个答案:

答案 0 :(得分:3)

当您使用参数调用make时,您将为其提供目标的列表。

Upgrading Ports section of the FreeBSD Handbook中对此进行了一些讨论:

Unlike the usual make install clean command, it will upgrade all
the dependencies prior to building and installing the selected
port.

[...]

Note: You can save two extra steps by just running make install
clean instead of make, make install and make clean as three
separate steps.

另外,作为旁注:除非你真的需要,否则不要以root用户身份构建你的软件包。一般来说,您应该使用无特权的帐户,然后作为最后一步,如果必须,您可以sudo make install。不过,最好将非特权用户添加到对安装目录具有写访问权限的组中,或者更好地将其安装到非系统区域(例如,使用./configure可以使用{ {1}})因为大多数系统,无论是Linux还是BSD,通常都有软件包和用于安装软件的打包系统。

相关问题