This patch fixes the issue of configure generating broken Makefile
authorSam Lantinga <slouken@libsdl.org>
Thu, 27 Jan 2011 14:54:20 -0800
changeset 5112 39772ccf7ddd
parent 5111 481dabb098ef
child 5113 686d795b1b29
This patch fixes the issue of configure generating broken Makefile when .cc files are used due to bad sed substitution on multiple passes: $(objects)/SDL_BeApp.lo: $(objects)/SDL_BeApp.lo: ./src/main/beos/SDL_BeApp.c $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@c $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ Signed-off-by: Fran├žois Revol
configure.in
--- a/configure.in	Thu Jan 27 14:45:06 2011 -0800
+++ b/configure.in	Thu Jan 27 14:54:20 2011 -0800
@@ -2712,10 +2712,10 @@
 fi
 
 OBJECTS=`echo $SOURCES`
-DEPENDS=`echo $SOURCES`
+DEPENDS=`echo $SOURCES | tr ' ' '\n'`
 for EXT in asm cc m c S; do
     OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
-    DEPENDS=`echo "$DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT,\\\\
+    DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
 \\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
 	\\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
 done