內核開發基礎——make mrproper及mrproper的含義


 Linux下面去編譯項目之前,一般常會用make mrproper去先刪除之前編譯所生成的文件和配置文件,備份文件等,其中,mrproper和distclean,clean之間的區別,Linux內核源碼根目錄下面的makefile中,有很清晰的解釋:
help:
 @echo  'Cleaning targets:'
 @echo  '  clean    - Remove most generated files but keep the config and'
 @echo  '                    enough build support to build external modules'
 @echo  '  mrproper   - Remove all generated files + config + various backup files'

 @echo  '  distclean   - mrproper + remove editor backup and patch files'

 

          mrproper到底是什么意思呢?為什么起了個這么個看起來如此詭異的名字。


            在英文wiki對Mr. Clean的解釋提到了此點;
 http://en.wikipedia.org/wiki/Mr._Clean
  "make mrproper" is a command in the Linux kernel build system, used to "clean up" all files from past builds and restore the build directory to its original clean state. The reason "make mrproper" is used instead of "make mrclean" is because Linus Torvalds, the father of Linux, was familiar with the name "Mr. Proper" as this is the brand widely known in Europe."

          總的來說,就是:首先,我們要知道的是make mrproper想要做的事情是,清理舊的編譯生成的文件及其他配置等文件,所以,相當於Clean,即我們在現實世界中用清潔劑去清潔衛生,清理舊的,不再需要的,臟東西。而現實世界中,保潔(P&G)公司的,有一個清潔產品方面的品牌,在美國叫做Mr.Clean,在歐洲叫做Mr.Proper,所以編譯之前的清理舊東西的命令,原先是用的make mrclean,即make Mr.Clean。只是后來被Linux之父Linus Torvalds改成了make mrproper,即make Mr.Proper。所以,現在就變成了用make mrproper來清理之前的東西了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM