+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.
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.
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"` \