Tweak gettext configury to reuse it in src
Daniel Jacobowitz
drow@false.org
Fri May 26 03:46:00 GMT 2006
Does this patch look OK? The main problem it is solving is that
ZW_GNU_GETTEXT_SISTER_DIR was not an adequate replacement for
AM_GNU_GETTEXT in directories which used a traditional
po/Makefile.in.in (which binutils calls po/Make-in). It defined
CATALOGS as po/foo.gmo instead of the former foo.gmo, and
missed some other substitutions.
I pushed the po/ prefixes out to gcc and libcpp, where they were
wanted.
--
Daniel Jacobowitz
CodeSourcery
2006-05-25 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (CATALOGS): Add po/ prefix.
* configure: Regenerated.
2006-05-25 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (CATALOGS): Add po/ prefix.
* configure: Regenerated.
2006-05-25 Daniel Jacobowitz <dan@codesourcery.com>
* gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Provide some
defines otherwise gotten from AM_GNU_GETTEXT. Remove the
po/ prefix from CATALOGS.
Index: libcpp/Makefile.in
===================================================================
--- libcpp/Makefile.in (revision 113932)
+++ libcpp/Makefile.in (working copy)
@@ -31,7 +31,7 @@
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
-CATALOGS = @CATALOGS@
+CATALOGS = $(patsubst %,po/%,@CATALOGS@)
CC = @CC@
CFLAGS = @CFLAGS@
WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 113932)
+++ gcc/Makefile.in (working copy)
@@ -4633,7 +4633,7 @@
XGETTEXT = @XGETTEXT@
GMSGFMT = @GMSGFMT@
MSGMERGE = msgmerge
-CATALOGS = @CATALOGS@
+CATALOGS = $(patsubst %,po/%,@CATALOGS@)
.PHONY: build- install- build-po install-po update-po
Index: config/gettext-sister.m4
===================================================================
RCS file: /cvs/src/src/config/gettext-sister.m4,v
retrieving revision 1.1
diff -u -p -r1.1 gettext-sister.m4
--- config/gettext-sister.m4 23 Sep 2004 19:43:47 -0000 1.1
+++ config/gettext-sister.m4 25 May 2006 22:11:17 -0000
@@ -46,8 +46,8 @@ else
# by the backticks, then collapsed again by the double quotes,
# leaving us with one backslash in the sed expression (right
# before the dot that mustn't act as a wildcard).
- cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
- lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+ cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
# The user is allowed to set LINGUAS to a list of languages to
# install catalogs for. If it's empty that means "all of them."
if test "x$LINGUAS" = x; then
@@ -63,4 +63,17 @@ else
done
LINGUAS="$XLINGUAS"
AC_MSG_RESULT($LINGUAS)
+
+ dnl Set up some additional variables which our po/Make-in files
+ dnl may need.
+
+ dnl For backward compatibility. Some Makefiles may be using these.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+ CATOBJEXT=.gmo
+ AC_SUBST(CATOBJEXT)
fi])
More information about the Gcc-patches
mailing list