# HG changeset patch # User Sam Lantinga # Date 1256704070 0 # Node ID 1756b9569141bcca302bf3e05d3d091ca05b7d2c # Parent 1e45c3012a4fd56713833c43fef11a31ba93bf1e 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. diff -r 1e45c3012a4f -r 1756b9569141 configure.in --- a/configure.in Fri Oct 23 04:08:32 2009 +0000 +++ b/configure.in Wed Oct 28 04:27:50 2009 +0000 @@ -2758,24 +2758,24 @@ DEPENDS=`echo $SOURCES` 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"` done VERSION_OBJECTS=`echo $VERSION_SOURCES` VERSION_DEPENDS=`echo $VERSION_SOURCES` 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_SOURCES` SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES` 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