From: jacob berkman Date: Sun, 28 Oct 2001 16:34:24 +0000 (+0000) Subject: version of gettextize which uses glib's po/Makefile.in.in and X-Git-Tag: GOBJECT_GType_guint~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d59c859aec6a80f4d9ed1c28487952929d7f19e8;p=platform%2Fupstream%2Fglib.git version of gettextize which uses glib's po/Makefile.in.in and 2001-10-28 jacob berkman * glib-gettextize.in: version of gettextize which uses glib's po/Makefile.in.in and po2tbl.sed.in, and no longer copies in intl/ or installs ChangeLog entries in po/ChangeLog * configure.in (AC_OUTPUT): generate glib-gettextize * Makefile.am (bin_SCRIPTS): install glib-gettextize 2001-10-28 jacob berkman * Makefile.in.in: install Makefile.in.in and po2tbl.sed.in for use with glib-gettextize by other packages --- diff --git a/Makefile.am b/Makefile.am index 435167e..f23a226 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,8 @@ AUTOMAKE_OPTIONS = 1.4 SUBDIRS = . m4macros glib gobject gmodule gthread docs tests build po +bin_SCRIPTS = glib-gettextize + INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \ -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION diff --git a/configure.in b/configure.in index d9d44a6..2794927 100644 --- a/configure.in +++ b/configure.in @@ -2136,6 +2136,7 @@ gthread-2.0-uninstalled.pc gobject-2.0.pc gobject-2.0-uninstalled.pc glib.spec +glib-gettextize Makefile build/Makefile build/win32/Makefile diff --git a/glib-gettextize.in b/glib-gettextize.in new file mode 100644 index 0000000..21bf0cb --- /dev/null +++ b/glib-gettextize.in @@ -0,0 +1,166 @@ +#! /bin/sh +# +# Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# - Modified in October 2001 by jacob berkman to +# work with glib's Makefile.in.in and po2tbl.sed.in, to not copy in +# intl/, and to not add ChangeLog entries to po/ChangeLog + +# This file is meant for authors or maintainers which want to +# internationalize their package with the help of GNU gettext. For +# further information how to use it consult the GNU gettext manual. + +echo=echo +progname=$0 +force=0 +configstatus=0 +origdir=`pwd` +usage="\ +Usage: glib-gettextize [OPTION]... [package-dir] + --help print this help and exit + --version print version information and exit + -c, --copy copy files instead of making symlinks + -f, --force force writing of new files even if old exist +Report bugs to http://bugzilla.gnome.org/." +package=@PACKAGE@ +version=@VERSION@ +try_ln_s=: + +# Directory where the sources are stored. +prefix=@prefix@ +gettext_dir=@prefix@/share/glib-2.0/gettext + +while test $# -gt 0; do + case "$1" in + -c | --copy | --c* ) + shift + try_ln_s=false ;; + -f | --force | --f* ) + shift + force=1 ;; + -r | --run | --r* ) + shift + configstatus=1 ;; + --help | --h* ) + $echo "$usage"; exit 0 ;; + --version | --v* ) + echo "$progname (GNU $package) $version" + $echo "Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + $echo "Written by" "Ulrich Drepper" + exit 0 ;; + -- ) # Stop option prcessing + shift; break ;; + -* ) + $echo "glib-gettextize: unknown option $1" + $echo "Try \`glib-gettextize --help' for more information."; exit 1 ;; + * ) + break ;; + esac +done + +if test $# -gt 1; then + $echo "$usage" + exit 1 +fi + +# Fill in the command line options value. +if test $# -eq 1; then + srcdir=$1 + if cd $srcdir; then + srcdir=`pwd` + else + $echo "Cannot change directory to \`$srcdir'" + exit 1 + fi +else + srcdir=$origdir +fi + +test -f configure.in || test -f configure.ac || { + $echo "Missing configure.in or configure.ac, please cd to your package first." + exit 1 +} + +if test -f po/Makefile.in.in && test $force -eq 0; then + $echo "\ +po/Makefile.in.in exists: use option -f if you really want to delete it." + exit 1 +fi + +if test -f po/po2tbl.sed.in && test $force -eq 0; then + $echo "\ +po/po2tbl.sed.in exists: use option -f if you really want to delete it." + exit 1 +fi + +test -d po || { + $echo "Creating po/ subdirectory" + mkdir po || { + $echo "failed to create po/ subdirectory" + exit 1 + } +} + +# For simplicity we changed to the gettext source directory. +cd $gettext_dir || { + $echo "gettext source directory '${gettext_dir}' doesn't exist" + exit 1 +} + +# Now copy all files. Take care for the destination directories. +for file in *; do + case $file in + intl | po) + ;; + *) + rm -f $srcdir/$file + ($try_ln_s && ln -s $gettext_dir/$file $srcdir/$file && $echo "Symlinking file $file") 2>/dev/null || + { $echo "Copying file $file"; cp $file $srcdir/$file; } + ;; + esac +done + +# Copy files to po/ subdirectory. +cd po +for file in *; do + rm -f $srcdir/po/$file + ($try_ln_s && ln -s $gettext_dir/po/$file $srcdir/po/$file && $echo "Symlinking file po/$file") 2>/dev/null || + { $echo "Copying file po/$file"; cp $file $srcdir/po/$file; } +done +if test -f $srcdir/po/cat-id-tbl.c; then + $echo "Removing po/cat-id-tbl.c" + rm -f $srcdir/po/cat-id-tbl.c +fi +if test -f $srcdir/po/stamp-cat-id; then + $echo "Removing po/stamp-cat-id" + rm -f $srcdir/po/stamp-cat-id +fi + +echo +echo "Please add the files" +echo " codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4" +echo " progtest.m4" +echo "from the @datadir@/aclocal directory to your autoconf macro directory" +echo "or directly to your aclocal.m4 file." +echo "You will also need config.guess and config.sub, which you can get from" +echo "ftp://ftp.gnu.org/pub/gnu/config/." +echo + +exit 0 diff --git a/po/ChangeLog b/po/ChangeLog index 437234f..7bcd5ba 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,8 @@ +2001-10-28 jacob berkman + + * Makefile.in.in: install Makefile.in.in and po2tbl.sed.in for use + with glib-gettextize by other packages + 2001-10-13 Stanislav Visnovsky * sk.po: More updates. diff --git a/po/Makefile.in.in b/po/Makefile.in.in index d8bc42e..f00b218 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -9,8 +9,11 @@ # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # +# - Modified by jacob berkman to install +# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @@ -25,7 +28,7 @@ exec_prefix = @exec_prefix@ datadir = $(prefix)/@DATADIRNAME@ localedir = $(datadir)/locale gnulocaledir = $(prefix)/share/locale -gettextsrcdir = $(prefix)/share/gettext/po +gettextsrcdir = $(prefix)/share/glib-2.0/gettext/po subdir = po INSTALL = @INSTALL@ @@ -155,7 +158,7 @@ install-data-yes: all fi; \ fi; \ done - if test "$(GETTEXT_PACKAGE)" = "gettext"; then \ + if test "$(PACKAGE)" = "glib"; then \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ @@ -163,6 +166,8 @@ install-data-yes: all fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ + $(INSTALL_DATA) $(srcdir)/po2tbl.sed.in \ + $(DESTDIR)$(gettextsrcdir)/po2tbl.sed.in; \ else \ : ; \ fi