From 4f83315d18c93036be3c07d144b0226bbe762468 Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
Date: Sat, 7 Jun 2014 20:24:19 -0700
Subject: [PATCH] Makefile: skip .d inclusion for 'testdata' target

avoids some unnecessary work when pulling testdata in a freshly
configured tree

Change-Id: Ib43379b0e1549107f3f1b227afca49a899bcc3ab
---
 build/make/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/build/make/Makefile b/build/make/Makefile
index 63ec271b72..dc61429a97 100644
--- a/build/make/Makefile
+++ b/build/make/Makefile
@@ -330,7 +330,10 @@ endef
 ifneq ($(target),)
 include $(SRC_PATH_BARE)/$(target:-$(TOOLCHAIN)=).mk
 endif
-ifeq ($(filter %clean,$(MAKECMDGOALS)),)
+
+skip_deps := $(filter %clean,$(MAKECMDGOALS))
+skip_deps += $(findstring testdata,$(MAKECMDGOALS))
+ifeq ($(strip $(skip_deps)),)
   # Older versions of make don't like -include directives with no arguments
   ifneq ($(filter %.d,$(OBJS-yes:.o=.d)),)
     -include $(filter %.d,$(OBJS-yes:.o=.d))
-- 
GitLab