]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make the libintl.res rule work with older versions of sed as well.
authorBruno Haible <bruno@clisp.org>
Sun, 21 Oct 2007 02:55:56 +0000 (02:55 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:21 +0000 (12:15 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/Makefile.in

index 91012ed76972d80b06b4c6c7a488cba462fa7574..4c503c604420b29e9b5b17eb8ae7aa17e64e6e3b 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-20  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.in (libintl.res): Put more literal newlines into the sed
+       scripts.
+
 2007-10-14  Bruno Haible  <bruno@clisp.org>
 
        * dcigettext.c (DCIGETTEXT): Save errno also around the tfind() call.
@@ -4069,4 +4074,4 @@ Sun Jul  2 02:06:50 1995  Ulrich Drepper  <drepper@myware>
        needed to internationalize own packages.  It provides functions
        which allow to use the X/Open catgets function with an interface
        like the Uniforum gettext function.  For system which does not
-       have neither of those a complete implementation is provided.
\ No newline at end of file
+       have neither of those a complete implementation is provided.
index 3fb0a0928f26d69e22c40fd5d276643fa3f4ff71..855761d22bc7f6115e57ba1a13b9e1cf7280e140 100644 (file)
@@ -273,18 +273,17 @@ osdep.lo: $(srcdir)/osdep.c
 intl-compat.lo: $(srcdir)/intl-compat.c
        $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
 
-# The following sed expressions contain a minimal amount of newlines, so that
-# they can be written in a Makefile without requiring a temporary file. It is
-# not POSIX compliant to use semicolons instead of newlines inside a group of
-# sed commands {...}. But this rule is executed only on Woe32 systems, which
-# can assume the presence of GNU sed (and GNU make).
+# This rule is executed only on Woe32 systems.
+# 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.
 libintl.res: $(srcdir)/libintl.rc
-       sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q};a\
-       0'; \
-       sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q};a\
-       0'; \
-       sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q};a\
-       0'; \
+       nl=$$'\n'; \
+       sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'a\'$${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}'a\'$${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}'a\'$${nl}0$${nl}q; \
        $(WINDRES) \
          "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \
          "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \