From 303b14025b2835e78e6ebe38bd4b2bf60cabe9b7 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 28 Oct 2009 04:27:50 +0000 Subject: [PATCH] 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. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404139 --- configure.in | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.in b/configure.in index 7cd5c1dde..4eb65af2d 100644 --- a/configure.in +++ b/configure.in @@ -2758,24 +2758,24 @@ OBJECTS=`echo $SOURCES` 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