在 *nix 中,当我编译软件时,我应该什么时候做:
# make install
对比
# make install clean
?
最佳答案
当您调用带有参数的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
您可以使用 --prefix=
) 因为大多数系统,无论是 Linux 还是 BSD,通常都有软件包和用于安装软件的打包系统。
关于linux - "Make install"与 "Make install clean"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8556125/