diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2005-04-06 22:42:28 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2005-04-06 22:42:28 +0000 |
commit | fb72a0a30b1f694b3cfdc33c95e47f14f60e9f43 (patch) | |
tree | a4029a76419863ddf4fb54daa0a4f19418273c12 /gcc/po/exgettext | |
parent | 58bf803e6c5f7e16989cf8b50b07e9c27264e92a (diff) | |
download | gcc-fb72a0a30b1f694b3cfdc33c95e47f14f60e9f43.zip gcc-fb72a0a30b1f694b3cfdc33c95e47f14f60e9f43.tar.gz gcc-fb72a0a30b1f694b3cfdc33c95e47f14f60e9f43.tar.bz2 |
re PR other/20792 (target.opt messages missing from gcc.pot)
gcc/
PR other/20792
* Makefile.in (gcc.pot): Remove options.c dependency.
* optc-gen.awk: Don't quote help strings with N_().
gcc/po/
PR other/20792
* exgettext: Don't scan options.c. Scan .opt files for help strings.
* gcc.pot: Regenerate.
From-SVN: r97759
Diffstat (limited to 'gcc/po/exgettext')
-rw-r--r-- | gcc/po/exgettext | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/gcc/po/exgettext b/gcc/po/exgettext index 0aa22ef..3408cb7 100644 --- a/gcc/po/exgettext +++ b/gcc/po/exgettext @@ -58,9 +58,6 @@ kopt=$pwd/$T/keyword-options emsg=$pwd/$T/emsgids.c posr=$pwd/$T/po-sources -# Extra files to scan -extra_files=$pwd/options.c - # 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 @@ -83,7 +80,6 @@ echo "scanning for keywords and %e strings..." >&2 do eval echo $dir$glob done done; - echo $extra_files; } | tr ' ' "$nl" | grep -v '\*' | $AWK -v excl=po/EXCLUDES -v posr=$posr -v kopt=$kopt -v emsg=$emsg ' function keyword_option(line) { @@ -161,6 +157,29 @@ END { }' ) +echo "scanning option files..." >&2 + +( cd $srcdir; find . -name '*.opt' -print | + $AWK '{ + file = $1 + lineno = 1 + field = 0 + while (getline < file) { + if (/^[ \t]*(;|$)/ || !/^[^ \t]/) { + field = 0 + } else { + if (field == 2) { + line = $0 + gsub(".*\t", "", line) + printf("#line %d \"%s\"\n", lineno, file) + printf("_(\"%s\")\n", line) + } + field++; + } + lineno++; + } + }') >> $emsg + # Run the xgettext command, with temporary added as a file to scan. echo "running xgettext..." >&2 $xgettext --default-domain=$package --directory=$srcdir \ |