summaryrefslogtreecommitdiff
path: root/gcc/po
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-23 02:55:20 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-23 02:55:20 +0000
commit3d1c8aeecd79bff96ae05b620f6d19a63fd303f9 (patch)
tree007e8c915c328f8a5200b2e4ad6177757a7612a7 /gcc/po
parent0ae4308e1e53b559a5ac928194faee5a1d121e60 (diff)
downloadgcc-3d1c8aeecd79bff96ae05b620f6d19a63fd303f9.tar.gz
* exgettext: Merge changes from diffutils. Scan .def files in
addition to .c and .h. Add --language=c to xgettext command line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49121 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/po')
-rw-r--r--gcc/po/ChangeLog5
-rw-r--r--gcc/po/exgettext40
2 files changed, 26 insertions, 19 deletions
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index 4f300f80802..3e4fd9c586f 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-22 Zack Weinberg <zack@codesourcery.com>
+
+ * exgettext: Merge changes from diffutils. Scan .def files in
+ addition to .c and .h. Add --language=c to xgettext command line.
+
2001-12-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* es.po: Update to 3.0 template.
diff --git a/gcc/po/exgettext b/gcc/po/exgettext
index 6b1073eff1d..712e3c4808a 100644
--- a/gcc/po/exgettext
+++ b/gcc/po/exgettext
@@ -1,18 +1,16 @@
#! /bin/sh
-# Wrapper around gettext for GCC sources.
-# Copyright 1998, 2001 Free Software Foundation, Inc.
+# Wrapper around gettext for programs using the msgid convention.
+# Copyright 1998, 2001, 2002 Free Software Foundation, Inc.
# Written by Paul Eggert <eggert@twinsun.com>.
# Revised by Zack Weinberg <zackw@stanford.edu> for no-POTFILES operation.
-# This file is part of GNU CC.
-
-# GNU CC is free software; you can redistribute it and/or modify
+# 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.
-# GNU CC is distributed in the hope that it will be useful,
+# 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.
@@ -22,8 +20,14 @@
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-# Set environment to default value, if not already set.
-: ${AWK=awk}
+# Always operate in the C locale.
+LANG=C
+LANGUAGE=C
+LC_ALL=C
+export LANG LANGUAGE LC_ALL
+
+# Set AWK if environment has not already set it.
+AWK=${AWK-awk}
# The arguments to this wrapper are: the program to execute, the
# name of the "package", and the path to the source directory.
@@ -52,8 +56,8 @@ kopt=$pwd/$T/keyword-options
emsg=$pwd/$T/emsgids.c
posr=$pwd/$T/po-sources
-# Locate files to scan, and generate the list. All .c and .h files in
-# $srcdir are examined, likewise $srcdir/config and $srcdir/config/*
+# Locate files to scan, and generate the list. All .c, .h, and .def files
+# in $srcdir are examined, likewise $srcdir/config and $srcdir/config/*
# (directories). Also, all subdirectories of $srcdir that contain a
# config-lang.in. Exclusions come from $srcdir/po/EXCLUDE.
#
@@ -68,14 +72,12 @@ posr=$pwd/$T/po-sources
echo "scanning for keywords and %e strings..." >&2
( cd $srcdir
- lang_subdirs=`echo */config-lang.in | sed -e 's|/config-lang\.in||g'`
- { echo *.[ch]
- echo config/*.[ch]
- echo config/*/*.[ch]
- for l in $lang_subdirs
- do echo $l/*.[ch]
- done
- } | tr ' ' "$nl" |
+ lang_subdirs=`echo */config-lang.in | sed -e 's|config-lang\.in||g'`
+ for dir in "" config/ config/*/ $lang_subdirs
+ do for glob in '*.c' '*.h' '*.def'
+ do eval echo $dir$glob
+ done
+ done | tr ' ' "$nl" | grep -v '\*' |
$AWK -v excl=po/EXCLUDES -v posr=$posr -v kopt=$kopt -v emsg=$emsg '
function keyword_option(line) {
paren_index = index(line, "(")
@@ -153,4 +155,4 @@ END {
echo "running xgettext..." >&2
$xgettext --default-domain=$package --directory=$srcdir \
--add-comments `cat $kopt` --files-from=$posr \
- -o po/$package.pot
+ --language=c -o po/$package.pot