它是写在linux内核Makefile
中的
clean - Remove most generated files but keep the config and
enough build support to build external modules
mrproper - Remove all generated files + config + various backup files
Run Code Online (Sandbox Code Playgroud)
并且在arch 文档中指出
要完成准备工作,请确保内核树绝对干净;
$ make clean && make mrproper
那么如果make mrproper
进行更彻底的删除,为什么make clean
使用?
Kus*_*nda 28
清理在三个级别完成,如Linux 内核 Makefile中的注释所述:
###
# Cleaning is done on three levels.
# make clean Delete most generated files
# Leave enough to build external modules
# make mrproper Delete the current configuration, and all generated files
# make distclean Remove editor backup files, patch leftover files and the like
Run Code Online (Sandbox Code Playgroud)
根据 Makefile,mrproper
目标取决于clean
目标(参见第 1421 行)。此外,distclean
目标取决于mrproper
.
make mrproper
因此,执行就足够了,因为它还会删除与clean
目标所做的相同的事情(以及更多)。
在mrproper
1993年加入目标(的Linux 0.97.7),并一直依赖于clean
目标。这意味着,这是从来没有必要使用这两个目标中make clean && make mrproper
。
历史参考:https : //archive.org/details/git-history-of-linux