Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Adam Strzelecki to SDL
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
slouken committed Oct 28, 2009
1 parent c3708d1 commit 6ee43cc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions configure.in
Expand Up @@ -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

Expand Down

0 comments on commit 6ee43cc

Please sign in to comment.