Adam Strzelecki to SDL
authorSam Lantinga <slouken@libsdl.org>
Wed, 28 Oct 2009 04:27:50 +0000
changeset 34151756b9569141
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.
configure.in
     1.1 --- a/configure.in	Fri Oct 23 04:08:32 2009 +0000
     1.2 +++ b/configure.in	Wed Oct 28 04:27:50 2009 +0000
     1.3 @@ -2758,24 +2758,24 @@
     1.4  DEPENDS=`echo $SOURCES`
     1.5  for EXT in asm cc m c S; do
     1.6      OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
     1.7 -    DEPENDS=`echo "$DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.'$EXT',\\
     1.8 -$(objects)/\2.lo: \1/\2.'$EXT'\\
     1.9 -	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c $< -o $@,g'`
    1.10 +    DEPENDS=`echo "$DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT,\\\\
    1.11 +\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
    1.12 +	\\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    1.13  done
    1.14  
    1.15  VERSION_OBJECTS=`echo $VERSION_SOURCES`
    1.16  VERSION_DEPENDS=`echo $VERSION_SOURCES`
    1.17  VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
    1.18 -VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.rc,\\
    1.19 -$(objects)/\2.o: \1/\2.rc\\
    1.20 -	\$(WINDRES) \$< \$@,g'`
    1.21 +VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
    1.22 +\\$(objects)/\\2.o: \\1/\\2.rc\\\\
    1.23 +	\\$(WINDRES) \\$< \\$@,g"`
    1.24  
    1.25  SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
    1.26  SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
    1.27  SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
    1.28 -SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed 's,\([[^ ]]*\)/\([[^ ]]*\)\.c,\\
    1.29 -$(objects)/\2.o: \1/\2.c\\
    1.30 -	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) '"$DEPENDENCY_TRACKING_OPTIONS"' -c $< -o $@,g'`
    1.31 +SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
    1.32 +\\$(objects)/\\2.o: \\1/\\2.c\\\\
    1.33 +	\\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    1.34  
    1.35  # Set runtime shared library paths as needed
    1.36