From b5399c84fff4b5c8ccb2ba78b687973fae40abdd Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 11 Nov 2021 16:33:24 -0800 Subject: [PATCH] Add .PHONY for dist-for-goals targets Mac builds don't include build/make/core/tasks/general-tests.mk which causes the general-tests target not to be marked phony. Have Soong mark all dist-for-goals targets as phony so it doesn't rely on other makefiles being present. Bug: 205928834 Test: forrest Change-Id: I9394c9c794fc83cde9649aa12a3039526d8206f3 --- android/makevars.go | 1 + 1 file changed, 1 insertion(+) diff --git a/android/makevars.go b/android/makevars.go index 8825d1aa6..665d57625 100644 --- a/android/makevars.go +++ b/android/makevars.go @@ -422,6 +422,7 @@ func (s *makeVarsSingleton) writeLate(phonies []phony, dists []dist) []byte { fmt.Fprintln(buf) for _, dist := range dists { + fmt.Fprintf(buf, ".PHONY: %s\n", strings.Join(dist.goals, " ")) fmt.Fprintf(buf, "$(call dist-for-goals,%s,%s)\n", strings.Join(dist.goals, " "), strings.Join(dist.paths, " ")) }