Adam Strzelecki to SDL
authorSam Lantinga <>
Wed, 28 Oct 2009 04:27:50 +0000
changeset 3415 1756b9569141
parent 3414 1e45c3012a4f
child 3416 3d50171ac879
Adam Strzelecki to SDL Actually after my patch commited in r4928 MinGW configure seems to generate broken Makefile due MSYS bash bug. (Attaching cure/patch below) The problem is that: TEST=`echo 'one\\ two\\ three\\'` echo "$TEST" Should echo: one\ two\ three\ Does it on Linux, Mac.. all UNIX but not on MSYS (MinGW) which outputs: one\two\three\ (new lines removed, probably it doesn't like backslashes) Probably this bug should be submitted to MSYS team, but not waiting till MSYS gets it fixed (they have very slow release cycles) here goes simple cure... My patch simply replaces single quoted SED rules where we needed newlien injection with double quoted ones. Tested on Mac, Linux & MinGW. Please review it ASAP coz this may be showstopper for everybody compiling with MinGW.
--- a/	Fri Oct 23 04:08:32 2009 +0000
+++ b/	Wed Oct 28 04:27:50 2009 +0000
@@ -2758,24 +2758,24 @@
 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',\\
-$(objects)/\2.lo: \1/\2.'$EXT'\\
-	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c $< -o $@,g'`
+    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"`
 VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
-VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.rc,\\
-$(objects)/\2.o: \1/\2.rc\\
-	\$(WINDRES) \$< \$@,g'`
+VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
+\\$(objects)/\\2.o: \\1/\\2.rc\\\\
+	\\$(WINDRES) \\$< \\$@,g"`
 SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
-SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
-$(objects)/\2.o: \1/\2.c\\
-	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c $< -o $@,g'`
+SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+\\$(objects)/\\2.o: \\1/\\2.c\\\\
+	\\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
 # Set runtime shared library paths as needed