diff --git a/core/Makefile b/core/Makefile index 78d1c325c..c2cd3ff73 100644 --- a/core/Makefile +++ b/core/Makefile @@ -986,8 +986,12 @@ $(INSTALLED_FILES_FILE): $(INSTALLED_SYSTEMIMAGE) .PHONY: installed-file-list installed-file-list: $(INSTALLED_FILES_FILE) +ifneq ($(filter sdk,$(MAKECMDGOALS)),) $(call dist-for-goals, sdk, $(INSTALLED_FILES_FILE)) +endif +ifneq ($(filter sdk_addon,$(MAKECMDGOALS)),) $(call dist-for-goals, sdk_addon, $(INSTALLED_FILES_FILE)) +endif # ----------------------------------------------------------------- # A zip of the tests that are built when running "make tests". diff --git a/core/main.mk b/core/main.mk index 1fd546e71..fb5fe62d8 100644 --- a/core/main.mk +++ b/core/main.mk @@ -691,6 +691,8 @@ droidcore: files \ .PHONY: droid tests droid tests: droidcore +# Dist for droid if droid is among the cmd goals, or no cmd goal is given. +ifneq ($(filter droid,$(MAKECMDGOALS))$(filter ||,|$(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))|),) $(call dist-for-goals, droid, \ $(INTERNAL_UPDATE_PACKAGE_TARGET) \ $(INTERNAL_OTA_PACKAGE_TARGET) \ @@ -709,7 +711,7 @@ ifeq ($(EMMA_INSTRUMENT),true) $(call dist-for-goals, droid, \ $(EMMA_META_ZIP) \ ) -endif +endif # EMMA_INSTRUMENT # Tests are installed in userdata.img. If we're building the tests # variant, copy it for "make tests dist". Also copy a zip of the @@ -720,7 +722,8 @@ $(call dist-for-goals, droid, \ $(INSTALLED_USERDATAIMAGE_TARGET) \ $(BUILT_TESTS_ZIP_PACKAGE) \ ) -endif +endif # tests +endif # droid in $(MAKECMDGOALS) .PHONY: docs docs: $(ALL_DOCS) @@ -728,10 +731,12 @@ docs: $(ALL_DOCS) .PHONY: sdk ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET) sdk: $(ALL_SDK_TARGETS) +ifneq ($(filter sdk,$(MAKECMDGOALS)),) $(call dist-for-goals,sdk, \ $(ALL_SDK_TARGETS) \ $(SYMBOLS_ZIP) \ ) +endif .PHONY: samplecode sample_MODULES := $(sort $(call get-tagged-modules,samples))