Skip to content

Commit

Permalink
Prepend path to dependency info files with sed
Browse files Browse the repository at this point in the history
The old way was error prone due to it's use of a fixed path file and
confusing.

closes RIOT-OS#775
  • Loading branch information
LudwigKnuepfer committed Mar 3, 2014
1 parent 49b1f44 commit b746b35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile.base
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b746b35

Please sign in to comment.