summaryrefslogtreecommitdiff
path: root/make_helpers
diff options
context:
space:
mode:
authorJuan Castillo <juan.castillo@arm.com>2015-10-22 11:34:44 +0100
committerJuan Castillo <juan.castillo@arm.com>2015-10-27 15:25:00 +0000
commit88154678c5e6d0e6e28ca17beb01049a9ea4c0a0 (patch)
tree5cc28a0bbc8156571199fce68b11e36fcb425c1a /make_helpers
parent73c99d4eb377e0e25f7951be53087bf92e7b4b18 (diff)
Make: fix dependency files generation
Currently, if no make goal is specified in the command line, 'all' is assumed by default, but the dependency files are not generated. This might lead to a successful but inconsistent build. This patch provides a fix to the problem. Change-Id: I0148719e114dbdbe46f8a57c7d05da7cbc212c92
Diffstat (limited to 'make_helpers')
-rw-r--r--make_helpers/build_macros.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 0e2e2ac9..9ab6e648 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -112,6 +112,12 @@ endef
# Auxiliary macros to build TF images from sources
################################################################################
+# If no goal is specified in the command line, .DEFAULT_GOAL is used.
+# .DEFAULT_GOAL is defined in the main Makefile before including this file.
+ifeq ($(MAKECMDGOALS),)
+MAKECMDGOALS := $(.DEFAULT_GOAL)
+endif
+
define match_goals
$(strip $(foreach goal,$(1),$(filter $(goal),$(MAKECMDGOALS))))
endef