Loading core/cleanbuild.mk +5 −7 Original line number Diff line number Diff line Loading @@ -13,6 +13,9 @@ # limitations under the License. # # Don't bother with the cleanspecs if you are running mm/mmm ifndef ONE_SHOT_MAKEFILE INTERNAL_CLEAN_STEPS := # Builds up a list of clean steps. Creates a unique Loading Loading @@ -78,18 +81,13 @@ else $(info Clean step: $(INTERNAL_CLEAN_STEP.$(step))) \ $(shell $(INTERNAL_CLEAN_STEP.$(step))) \ ) # If we are running mm/mmm, we should copy over the other clean steps too. ifneq ($(ONE_SHOT_MAKEFILE),) INTERNAL_CLEAN_STEPS := $(strip $(CURRENT_CLEAN_STEPS) $(steps)) endif steps := endif CURRENT_CLEAN_BUILD_VERSION := CURRENT_CLEAN_STEPS := # Write the new state to the file. # Don't write the file if we are running mm/mmm but without a preexisting clean_steps_file. ifneq (,$(wildcard $(clean_steps_file))$(filter ||,|$(ONE_SHOT_MAKEFILE)|)) # $(shell \ mkdir -p $(dir $(clean_steps_file)) && \ echo "CURRENT_CLEAN_BUILD_VERSION := $(INTERNAL_CLEAN_BUILD_VERSION)" > \ Loading @@ -97,12 +95,12 @@ $(shell \ echo "CURRENT_CLEAN_STEPS := $(INTERNAL_CLEAN_STEPS)" >> \ $(clean_steps_file) \ ) endif clean_steps_file := INTERNAL_CLEAN_STEPS := INTERNAL_CLEAN_BUILD_VERSION := endif # ifndef ONE_SHOT_MAKEFILE # Since products and build variants (unfortunately) share the same # PRODUCT_OUT staging directory, things can get out of sync if different Loading core/cleanspec.mk +1 −26 Original line number Diff line number Diff line Loading @@ -63,32 +63,7 @@ INTERNAL_CLEAN_BUILD_VERSION := 6 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ # Get the path of the top of the tree. # for example: # /home/bob/master/framework/base => /home/bob/master # See function gettop in build/envsetup.sh. define get-top-dir $(if $(1),$(if $(wildcard $(1)/build/core/envsetup.mk),$(1),$(strip \ $(call get-top-dir,$(patsubst %/,%,$(dir $(1))))))) endef ifneq ($(ONE_SHOT_MAKEFILE),) cs_subdirs := $(patsubst %/,%,$(dir $(ONE_SHOT_MAKEFILE))) abs_cs_subdirs := $(filter /%,$(cs_subdirs)) ifneq ($(abs_cs_subdirs),) # Convert absolute path to relative path, e.g. when using mm. abs_top_path := $(call get-top-dir,$(word 1,$(abs_cs_subdirs))) cs_subdirs := $(filter-out /%,$(cs_subdirs)) \ $(patsubst $(abs_top_path)/%,%,$(abs_cs_subdirs)) abs_top_path := abs_cs_subdirs := endif else cs_subdirs := . endif subdir_cleanspecs := \ $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git $(cs_subdirs) CleanSpec.mk) $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git . CleanSpec.mk) include $(subdir_cleanspecs) cs_subdirs := subdir_cleanspecs := core/main.mk +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ include $(BUILD_SYSTEM)/help.mk # and host information. include $(BUILD_SYSTEM)/config.mk # This allows us to force a clean build - included after the config.make # This allows us to force a clean build - included after the config.mk # environment setup is done, but before we generate any dependencies. This # file does the rm -rf inline so the deps which are all done below will # be generated correctly Loading Loading
core/cleanbuild.mk +5 −7 Original line number Diff line number Diff line Loading @@ -13,6 +13,9 @@ # limitations under the License. # # Don't bother with the cleanspecs if you are running mm/mmm ifndef ONE_SHOT_MAKEFILE INTERNAL_CLEAN_STEPS := # Builds up a list of clean steps. Creates a unique Loading Loading @@ -78,18 +81,13 @@ else $(info Clean step: $(INTERNAL_CLEAN_STEP.$(step))) \ $(shell $(INTERNAL_CLEAN_STEP.$(step))) \ ) # If we are running mm/mmm, we should copy over the other clean steps too. ifneq ($(ONE_SHOT_MAKEFILE),) INTERNAL_CLEAN_STEPS := $(strip $(CURRENT_CLEAN_STEPS) $(steps)) endif steps := endif CURRENT_CLEAN_BUILD_VERSION := CURRENT_CLEAN_STEPS := # Write the new state to the file. # Don't write the file if we are running mm/mmm but without a preexisting clean_steps_file. ifneq (,$(wildcard $(clean_steps_file))$(filter ||,|$(ONE_SHOT_MAKEFILE)|)) # $(shell \ mkdir -p $(dir $(clean_steps_file)) && \ echo "CURRENT_CLEAN_BUILD_VERSION := $(INTERNAL_CLEAN_BUILD_VERSION)" > \ Loading @@ -97,12 +95,12 @@ $(shell \ echo "CURRENT_CLEAN_STEPS := $(INTERNAL_CLEAN_STEPS)" >> \ $(clean_steps_file) \ ) endif clean_steps_file := INTERNAL_CLEAN_STEPS := INTERNAL_CLEAN_BUILD_VERSION := endif # ifndef ONE_SHOT_MAKEFILE # Since products and build variants (unfortunately) share the same # PRODUCT_OUT staging directory, things can get out of sync if different Loading
core/cleanspec.mk +1 −26 Original line number Diff line number Diff line Loading @@ -63,32 +63,7 @@ INTERNAL_CLEAN_BUILD_VERSION := 6 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ # Get the path of the top of the tree. # for example: # /home/bob/master/framework/base => /home/bob/master # See function gettop in build/envsetup.sh. define get-top-dir $(if $(1),$(if $(wildcard $(1)/build/core/envsetup.mk),$(1),$(strip \ $(call get-top-dir,$(patsubst %/,%,$(dir $(1))))))) endef ifneq ($(ONE_SHOT_MAKEFILE),) cs_subdirs := $(patsubst %/,%,$(dir $(ONE_SHOT_MAKEFILE))) abs_cs_subdirs := $(filter /%,$(cs_subdirs)) ifneq ($(abs_cs_subdirs),) # Convert absolute path to relative path, e.g. when using mm. abs_top_path := $(call get-top-dir,$(word 1,$(abs_cs_subdirs))) cs_subdirs := $(filter-out /%,$(cs_subdirs)) \ $(patsubst $(abs_top_path)/%,%,$(abs_cs_subdirs)) abs_top_path := abs_cs_subdirs := endif else cs_subdirs := . endif subdir_cleanspecs := \ $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git $(cs_subdirs) CleanSpec.mk) $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git . CleanSpec.mk) include $(subdir_cleanspecs) cs_subdirs := subdir_cleanspecs :=
core/main.mk +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ include $(BUILD_SYSTEM)/help.mk # and host information. include $(BUILD_SYSTEM)/config.mk # This allows us to force a clean build - included after the config.make # This allows us to force a clean build - included after the config.mk # environment setup is done, but before we generate any dependencies. This # file does the rm -rf inline so the deps which are all done below will # be generated correctly Loading