From 7229287e47d5587b68c789f14b2198f0cdad2869 Mon Sep 17 00:00:00 2001
From: Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
Date: Tue, 25 Feb 2014 08:09:06 +0100
Subject: [PATCH] Prepend path to dependency info files with sed

The old way was error prone due to it's use of a fixed path file and
confusing.

closes #775
---
 Makefile.base | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile.base b/Makefile.base
index d5195431a2..cdc3efd752 100644
--- a/Makefile.base
+++ b/Makefile.base
@@ -33,7 +33,8 @@ $(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ)
 $(BINDIR)%.o: %.c
 	$(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o
 	$(AD)$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d
-	@printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
+	@# prepend path to dependency info file
+	$(AD)sed -i -e "1s|^|$(BINDIR)|" $(BINDIR)$*.d
 
 $(BINDIR)%.o: %.s
 	$(AD)$(AS) $(ASFLAGS) $*.s -o $(BINDIR)$*.o
-- 
GitLab