ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2010年11月23日 星期二

clean in Android makefile

ndroid 有關 clean 的 Make rule 寫在: build/core/cleanbuild.mk clean 的 target 有:
  • dataclean
  • installclean

installclean: installclean_files := \ ./$(HOST_OUT)/obj/NOTICE_FILES \ ./$(HOST_OUT)/sdk \ ./$(PRODUCT_OUT)/*.img \ ./$(PRODUCT_OUT)/*.txt \ ./$(PRODUCT_OUT)/*.xlb \ ./$(PRODUCT_OUT)/*.zip \ ./$(PRODUCT_OUT)/data \ ./$(PRODUCT_OUT)/obj/lib \ ./$(PRODUCT_OUT)/obj/APPS \ ./$(PRODUCT_OUT)/obj/NOTICE_FILES \ ./$(PRODUCT_OUT)/obj/PACKAGING \ ./$(PRODUCT_OUT)/recovery \ ./$(PRODUCT_OUT)/root \ ./$(PRODUCT_OUT)/symbols/system/lib \ ./$(PRODUCT_OUT)/system
dataclean: dataclean_files := \ ./$(PRODUCT_OUT)/data/* \ ./$(PRODUCT_OUT)/data-qemu/* \ ./$(PRODUCT_OUT)/userdata-qemu.img installclean 的 showcommands log: 另外在 main.mk 也有 clean target
  • clean
  • clobber
clean dirs_to_clean := \ $(PRODUCT_OUT) \ $(TARGET_COMMON_OUT_ROOT) \ $(HOST_OUT) \ $(HOST_COMMON_OUT_ROOT)
clobber rm -rf $(OUT_DIR) 所以最可怕的是 clobber 吧..
關於以上用到的目錄變數: OUT_DIR := out PRODUCT_OUT := out/target/
Android 的說明文件 說 If you build one flavor and then want to build another, you should run "make installclean" between the two makes to guarantee that you don't pick up files installed by the previous flavor. "make clean" will also suffice, but it takes a lot longer. 還有列出上面的 clean target:
  • clean-$(LOCAL_MODULE) and clean-$(LOCAL_PACKAGE_NAME) - Let you selectively clean one target. For example, you can type make clean-libutils and it will delete libutils.so and all of the intermediate files, or you can type make clean-Home and it will clean just the Home app.
  • clean - make clean deletes all of the output and intermediate files for this configuration. This is the same as rm -rf out//
  • clobber - make clobber deletes all of the output and intermediate files for all configurations. This is the same as rm -rf out/.
  • dataclean - make dataclean deletes contents of the data directory inside the current combo directory. This is especially useful on the simulator and emulator, where the persistent data remains present between builds.

沒有留言:

標籤

網誌存檔