This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tweak gettext configury to reuse it in src


On Thu, May 25, 2006 at 06:52:02PM -0400, Daniel Jacobowitz wrote:
> 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.

A piece of context missed in my original posting: I need this to use
Zack's new ZW_GNU_GETTEXT_SISTER_DIR in src/, which I in turn need to
remove the top level gettext.m4.  This will fix some configure problems
on platforms which the old and new gettext configury treat differently,
e.g. Cygwin.

Mark Mitchell approved this patch offline, with the condition that I
give any build system maintainers a day to respond if they see anything
wrong with it.  Barring any problems, I'll commit it tomorrow (and then
fix src).

> 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])
> 

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]