[patch] broken SDL configure on MinGW after r4928 (my dependency patch) due MSYS bash bug

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.
Very sorry for not testing it properly on MinGW before the previous
patch went into SVN repo, but I expected MSYS bash will behave like
any other bash, but it doesn’t :frowning:

Regards,–
Adam Strzelecki

-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL-SVN-MinGW-single-quote-backshash-kills-newline-in-autoconf.patch
Type: application/octet-stream
Size: 1933 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20091022/adce310d/attachment.obj

Bump, can we have this patch reviewed and maybe committed, as
currently MinGW builds are broken without it :((

Regards,–
Adam

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.
Very sorry for not testing it properly on MinGW before the previous
patch went into SVN repo, but I expected MSYS bash will behave like
any other bash, but it doesn’t :frowning:

Regards,

Adam Strzelecki

<SDL-SVN-MinGW-single-quote-backshash-kills-newline-in-autoconf.patch>

This is in, I’ve just been dragging my heels because all the
backslashes hurt my eyes. :wink:

Thanks!On Tue, Oct 27, 2009 at 3:36 PM, Adam Strzelecki wrote:

Bump, can we have this patch reviewed and maybe committed, as currently
MinGW builds are broken without it :((

Regards,

Adam

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.
Very sorry for not testing it properly on MinGW before the previous patch
went into SVN repo, but I expected MSYS bash will behave like any other
bash, but it doesn’t :frowning:

Regards,

Adam Strzelecki

<SDL-SVN-MinGW-single-quote-backshash-kills-newline-in-autoconf.patch>


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

This is in, I’ve just been dragging my heels because all the
backslashes hurt my eyes. :wink:

Thanks.

Yeah, this is pretty obscure. I thought about just replacing
backquotes with $(…), which seems to do the job as well and not
suffer eating linebreaks on MSYS, but I think this exists only in
Bash, so it could break other Bourne shell compatible shells. Ended up
with those nasty doublequotes then :slight_smile:

If only there was a solution to somehow shorten “configure” time on
MinGW too. This makes me tear my hair out every time I need to check
the whole build process is working with MinGW :>–
Adam