在编译内核之前到底应该使用make mrproper,make distclean,make clean中的哪个命令呢?

1. 先找到描述这三个命令的相关信息

  在内核目录下使用make help命令可以获取相关信息,信息如下:

    Cleaning targets:
      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
      distclean - mrproper + remove editor backup and patch files 

2. 从1即可获取相关信息,下面逐一分析

  make clean: 删除大部分生成的文件但是保留配置文件和足够的构建外部模块的构建支持

  make mrproper: 删除所有生成的文件,配置和各种各样备份的文件

  make distclean: 相当于执行一次make mrproper,然后再删除编辑器备份和补丁文件

3. 删除文件的范围比较

  make clean < make mrproper < make distclean

  

猜你喜欢

转载自www.cnblogs.com/dakewei/p/10978783.html
今日推荐