From: kuoyupeng.bbs@bbs.ntu.edu.tw (寫程式中)
請問在做kernel update時, 需不需要作make mrproper這個動作?
make mrproper這個動作主要公用為何?
From: "Lance Lee" <lance@linuxfaqs.dyndns.org>
依我個人的經驗發現make mrproper會清除kernel source中一些暫存檔案, 可
能是make depend或make config或make menuconfig產生在各目錄底下的 ".depend
" 檔, 或是make過程失敗的core dump... 零零種種, 不及備載, 主要是把 kernel
source還原到原始下載時的面貌, 僅提供在/usr/src/linux/Makefile 中片段做為
參考, 有興趣的人可以追根究底地了解其實際過程.
(請注意看, make mrproper也會執行到make clean)
clean: archclean
rm -f kernel/ksyms.lst include/linux/compile.h
rm -f core `find . -name '*.[oas]' ! \( -regex '.*lxdialog/.*' \
-o -regex '.*ksymoops/.*' \) -print`
rm -f core `find . -type f -name 'core' -print`
rm -f core `find . -name '.*.flags' -print`
rm -f vmlinux System.map
rm -f .tmp*
rm -f drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c
rm -f drivers/char/conmakehash
rm -f drivers/sound/bin2hex drivers/sound/hex2hex
if [ -d modules ]; then \
rm -f core `find modules/ -type f -print`; \
fi
rm -f submenu*
mrproper: clean archmrproper
rm -f include/linux/autoconf.h include/linux/version.h
rm -f
drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h
rm -f drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h
rm -f drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}
.h (緊接上行)
rm -f drivers/net/hamradio/soundmodem/gentbl
rm -f drivers/char/hfmodem/gentbl drivers/char/hfmodem/tables.h
rm -f drivers/sound/*_boot.h drivers/sound/.*.boot
rm -f drivers/sound/msndinit.c
rm -f drivers/sound/msndperm.c
rm -f drivers/sound/pndsperm.c
rm -f drivers/sound/pndspini.c
rm -f .version .config* config.in config.old
rm -f scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp
rm -f scripts/lxdialog/*.o scripts/lxdialog/lxdialog
rm -f scripts/ksymoops/*.o scripts/ksymoops/ksymoops
rm -f .menuconfig.log
rm -f include/asm
rm -rf include/config
rm -f .depend `find . -name .depend -print`
rm -f core `find . -size 0 -print`
rm -f .hdepend scripts/mkdep scripts/split-include
rm -f $(TOPDIR)/include/linux/modversions.h
rm -rf $(TOPDIR)/include/linux/modules
rm -rf modules