Skip to content

Commit

Permalink
pipe through sed instead
Browse files Browse the repository at this point in the history
  • Loading branch information
LudwigKnuepfer committed Mar 3, 2014
1 parent b746b35 commit d04c74d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Makefile.base
Expand Up @@ -29,12 +29,12 @@ $(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ)
# pull in dependency info for *existing* .o files
-include $(OBJ:.o=.d)

# compile and generate dependency info
# compile and generate dependency info,
# prepend path to dependency info file
$(BINDIR)%.o: %.c
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d
@# prepend path to dependency info file
$(AD)sed -i -e "1s|^|$(BINDIR)|" $(BINDIR)$*.d
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c |\
sed -e "1s|^|$(BINDIR)|" > $(BINDIR)$*.d

$(BINDIR)%.o: %.s
$(AD)$(AS) $(ASFLAGS) $*.s -o $(BINDIR)$*.o
Expand Down
4 changes: 2 additions & 2 deletions cpu/native/Makefile
Expand Up @@ -15,8 +15,8 @@ include $(RIOTBASE)/Makefile.base

$(BINDIR)%.o: %.c
$(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$*.o
$(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c > $(BINDIR)$*.d
@printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
$(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c |\
sed -e "1s|^|$(BINDIR)|" > $(BINDIR)$*.d


clean::
Expand Down

0 comments on commit d04c74d

Please sign in to comment.