From 4878f8a821fd16c151456b4ccd8489c4e632d081 Mon Sep 17 00:00:00 2001
From: Martine Lenders <mlenders@inf.fu-berlin.de>
Date: Sun, 31 May 2015 18:26:20 +0200
Subject: [PATCH] make: fix info-files target

aed4be3 broke this command, since the regular expressions here register
the macros that were introduced there, too. With this patch the skipping
of apps in travis works properly again.
---
 Makefile.buildtests | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile.buildtests b/Makefile.buildtests
index ed04493e94..77e05eb148 100644
--- a/Makefile.buildtests
+++ b/Makefile.buildtests
@@ -261,15 +261,15 @@ info-files: QUITE := 0
 info-files:
 	@( \
 		echo "$(abspath $(shell echo "$(MAKEFILE_LIST)"))" | tr ' ' '\n'; \
-		CSRC="$$($(MAKE) USEPKG="" -Bn | grep -o -e "[^ ]\+\.[csS]$$" -e "[^ ]\+\.[csS][ \']")"; \
+		CSRC="$$($(MAKE) USEPKG="" -Bn | grep -o -e "[^ ]\+\.[csS]$$" -e "[^ ]\+\.[csS][ \']" | grep -v -e "^\s*-D")"; \
 		echo "$$CSRC"; \
 		echo "$(RIOTBASE)/Makefile.base"; \
-		echo "$$CSRC" | xargs dirname | sort | uniq | xargs -I{} find {} -name "Makefile*"; \
+		echo "$$CSRC" | xargs dirname -- | sort | uniq | xargs -I{} find {} -name "Makefile*"; \
 		echo "$$CSRC" | xargs $(CC) $(CFLAGS) $(INCLUDES) -MM 2> /dev/null | grep -o "[^ ]\+\.h"; \
 		if [ -n "$$SRCXX" ]; then \
-			CPPSRC="$$($(MAKE) -Bn USEPKG="" | grep -o -e "[^ ]\+\.cpp")"; \
+			CPPSRC="$$($(MAKE) -Bn USEPKG="" | grep -o -e "[^ ]\+\.cpp" | grep -v -e "^\s*-D")"; \
 			echo "$$CPPSRC"; \
-			echo "$$CPPSRC" | xargs dirname | sort | uniq | xargs -I{} find {} -name "Makefile*"; \
+			echo "$$CPPSRC" | xargs dirname -- | sort | uniq | xargs -I{} find {} -name "Makefile*"; \
 			echo "$$CPPSRC" | xargs $(CXX) $(CXXFLAGS) $(INCLUDES) -MM 2> /dev/null | grep -o "[^ ]\+\.h"; \
 		fi; \
 		$(foreach pkg,$(USEPKG),find $(RIOTBASE)/pkg/$(pkg) -type f;) \
-- 
GitLab