freemyipod r4 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r3‎ | r4 | r5 >
Date:02:13, 28 July 2010
Author:farthen
Status:new
Tags:
Comment:
Finally fixes the dependency creation bug in the Makefile. This needs to be tested under Linux.
Modified paths:
  • /embios/trunk/Makefile (modified) (history)

Diff [purge]

Index: embios/trunk/Makefile
@@ -41,7 +41,9 @@
4242 @$(CC) -MM $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) $$< > $$@.dep
4343 @mv -f $$@.dep $$@.dep.tmp
4444 @sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
45 - @sed -e "s/.*://" -e "s/\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
 45+ @# Those many backslashes are necessary as make escapes them itself, then the shell
 46+ @# So make makes 4 out of 8, then the shell makes 2 out of 4 which is what we want
 47+ @sed -e "s/.*://" -e "s/\\\\\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
4648 @rm -f $$@.dep.tmp
4749
4850 build/$(1)/%.o: %.S
@@ -54,7 +56,9 @@
5557 @$(CC) -MM $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) $$< > $$@.dep
5658 @mv -f $$@.dep $$@.dep.tmp
5759 @sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
58 - @sed -e "s/.*://" -e "s/\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
 60+ @# Those many backslashes are necessary as make escapes them itself, then the shell
 61+ @# So make makes 4 out of 8, then the shell makes 2 out of 4 which is what we want
 62+ @sed -e "s/.*://" -e "s/\\\\\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
5963 @rm -f $$@.dep.tmp
6064 endef
6165