From c904e48cc5f8543a6f1295a228426f892dd23a56 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Sat, 20 Oct 2018 16:59:41 -0700 Subject: [PATCH] Fix dist-for-goals with no targets Bug: 117463001 Test: m dist vts Change-Id: I9bfe01472dcf3d3729a109e4de383d35e3af9df0 --- core/distdir.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/distdir.mk b/core/distdir.mk index a2eabd2b3e..5f404075df 100644 --- a/core/distdir.mk +++ b/core/distdir.mk @@ -34,7 +34,8 @@ _all_dist_src_dst_pairs := # to under the dist directory. Subdirs are ok, and will be created # at copy time if necessary. define dist-for-goals -$(eval _all_dist_goals += $$(1)) \ +$(if $(strip $(2)), \ + $(eval _all_dist_goals += $$(1))) \ $(foreach file,$(2), \ $(eval src := $(call word-colon,1,$(file))) \ $(eval dst := $(call word-colon,2,$(file))) \