Linux下make命令详解


当我们在使用make命令时,常常会在make后面加上其他单词,比如check,install,installcheck…这些单词都是make的参数,我们称之为“目标(targets)”。

最常见的几个目标:

make all:编译程序、库、文档等(等同于make)

make install:安装已经编译好的程序。复制文件树中到文件到指定的位置

make unistall:卸载已经安装的程序。

make clean:删除由make命令产生的文件

make distclean:删除由./configure产生的文件

make check:测试刚刚编译的软件(某些程序可能不支持)

make installcheck:检查安装的库和程序(某些程序可能不支持)

make dist:重新打包成packname-version.tar.gz

 

官方教程的原文:

The words check, install, and installcheck, passed as arguments to make, are called targets. make is a shorthand for make all, all being the default target in the GNU Build System. Here is a list of the most useful targets that the GNU Coding Standards specify.
make all:
Build programs, libraries, documentation, etc. (same as make).
make install
Install what needs to be installed, copying the files from the package’s tree to
system-wide directories.
make install-strip
Same as make install, then strip debugging symbols. Some users like to trade
space for useful bug reports. . .
make uninstall
The opposite of make install: erase the installed files. (This needs to be run
from the same build tree that was installed.)
make clean
Erase from the build tree the files built by make all.
make distclean
Additionally erase anything ./configure created.
make check
Run the test suite, if any.
make installcheck
Check the installed programs or libraries, if supported.
make dist Recreate ‘package-version.tar.gz’ from all the source files.


  • 3
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值