From 24e034a0bdac9b34974e60d793d8486efb45ada6 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 13 Nov 2017 13:34:04 -0800 Subject: [PATCH] Remove FORCE from gpl_source.tgz Package gpl_source.tgz directly into the dist directory (which is always removed between build server builds) so that FORCE is not needed. This prevents the build system from seeing a dirty rule at the end of a make checkbuild dist. Bug: 68062417 Test: m checkbuild dist Change-Id: I4a9d9deb1611cc9ba266e8c1ac086a7ef48061c4 --- core/tasks/collect_gpl_sources.mk | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/core/tasks/collect_gpl_sources.mk b/core/tasks/collect_gpl_sources.mk index 30ba62b609..70f0afe557 100644 --- a/core/tasks/collect_gpl_sources.mk +++ b/core/tasks/collect_gpl_sources.mk @@ -12,20 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -gpl_source_tgz := $(call intermediates-dir-for,PACKAGING,gpl_source,HOST,COMMON)/gpl_source.tgz +ifdef dist_goal + +# The rule below doesn't have dependenices on the files that it copies, +# so manually generate directly into the DIST_DIR directory that is always +# wiped between dist builds. +gpl_source_tgz := $(DIST_DIR)/gpl_source.tgz # FORCE since we can't know whether any of the sources changed $(gpl_source_tgz): PRIVATE_PATHS := $(sort $(patsubst %/, %, $(dir $(ALL_GPL_MODULE_LICENSE_FILES)))) -$(gpl_source_tgz) : $(ALL_GPL_MODULE_LICENSE_FILES) FORCE +$(gpl_source_tgz) : $(ALL_GPL_MODULE_LICENSE_FILES) @echo Package gpl sources: $@ - @rm -rf $(dir $@) && mkdir -p $(dir $@) $(hide) tar cfz $@ --exclude ".git*" $(PRIVATE_PATHS) - -.PHONY: gpl_source_tgz -gpl_source_tgz : $(gpl_source_tgz) - # Dist the tgz only if we are doing a full build ifeq (,$(TARGET_BUILD_APPS)) -$(call dist-for-goals, droidcore, $(gpl_source_tgz)) +droidcore: $(gpl_source_tgz) endif + +endif # dist_goal