bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gettext build for windows target fails if /bin/sh is not bash


From: Bruno Haible
Subject: Re: Gettext build for windows target fails if /bin/sh is not bash
Date: Sat, 7 Feb 2009 01:55:40 +0100
User-agent: KMail/1.9.9

Hi,

Marko Lindqvist wrote:
>  I'm cross-compiling gettext to Windows from Ubuntu Linux. Build
> system /bin/sh is dash, not bash
> 
>  gettext-runtime/intl/Makefile.in line 22 selects /bin/sh as shell in
> use, but as comment in line 285 states, bash is actually required.

Yes. When writing this code, I was assuming that every reasonable system
used for cross-compiling would have a bash installed as /bin/sh. I'm
deceived to hear that Ubuntu is not using bash as native POSIX shell.

> Simply changing shell in line 22 to /bin/bash fixes this for me.

I cannot do the same in the gettext sources: this would make the Makefile
break *entirely* (not only the libintl.res target) on all systems that
don't have a /bin/bash. I hope this tweak will make thinks work for you
as well as for everyone else:


2009-02-06  Bruno Haible  <address@hidden>

        * Makefile.in (libintl.res): Initialize nl without assuming GNU bash.
        Reported by Marko Lindqvist <address@hidden>.

--- gettext-runtime/intl/Makefile.in    25 Jan 2009 19:19:22 -0000      1.63
+++ gettext-runtime/intl/Makefile.in    7 Feb 2009 00:48:04 -0000
@@ -281,10 +281,9 @@
 # The following sed expressions come from the windres-options script. They are
 # inlined here, so that they can be written in a Makefile without requiring a
 # temporary file. They must contain literal newlines rather than semicolons,
-# so that they work with the sed-3.02 that is shipped with MSYS. We can use
-# GNU bash's $'\n' syntax to obtain such a newline.
+# so that they work with the sed-3.02 that is shipped with MSYS.
 libintl.res: $(srcdir)/libintl.rc
-       nl=$$'\n'; \
+       nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
        
sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q;
 \
        
sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q;
 \
        
sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q;
 \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]