Commit 67881e18 authored by zack's avatar zack

* Makefile.in (INTL_TARGETS, POSUB): Delete all references.

	(INTL_SUBDIRS): Just intl.
	(.SUFFIXES): Add .gmo .po .pox.
	(native): Also depend on build-@POSUB@.
	(intl.all, intl.install): Depend on config.h and things it includes.
	(po-generated): New target; depend on c-parse.c and tradcif.c.
	(install-normal): Also depend on install-@POSUB@.
	(XGETTEXT, GMSGFMT, MSGMERGE, PACKAGE, CATALOGS): New variables.
	(build-, install-, build-po, update-po, install-po,
	.po.gmo, .po.pox, $(PACKAGE).pot, po/$(PACKAGE).pot): New rules.

	* aclocal.m4: Prefix each entry in CATALOGS with "po/"
	* configure.in: Don't munge XGETTEXT.  Don't generate
	po/Makefile.in.
	* configure: Regenerate.

	* exgettext: Delete.
	* config/m68k/m68k.h: Add doc strings for -msky and -mnosky.
	* cp/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Replace
	$(INTL_TARGETS) with po-generated.

po:
	* EXCLUDES: New file.
	* exgettext: New helper script; completely rewritten.
	* Makefile.in.in, POTFILES.in: Delete.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46680 138bc75d-0d04-0410-961f-82ee72b054a4
parent 2c2ed384
2001-10-31 Zack Weinberg <zack@codesourcery.com>
* Makefile.in (INTL_TARGETS, POSUB): Delete all references.
(INTL_SUBDIRS): Just intl.
(.SUFFIXES): Add .gmo .po .pox.
(native): Also depend on build-@POSUB@.
(intl.all, intl.install): Depend on config.h and things it includes.
(po-generated): New target; depend on c-parse.c and tradcif.c.
(install-normal): Also depend on install-@POSUB@.
(XGETTEXT, GMSGFMT, MSGMERGE, PACKAGE, CATALOGS): New variables.
(build-, install-, build-po, update-po, install-po,
.po.gmo, .po.pox, $(PACKAGE).pot, po/$(PACKAGE).pot): New rules.
* aclocal.m4: Prefix each entry in CATALOGS with "po/"
* configure.in: Don't munge XGETTEXT. Don't generate
po/Makefile.in.
* configure: Regenerate.
* exgettext: Delete.
* config/m68k/m68k.h: Add doc strings for -msky and -mnosky.
* objc/Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2001-10-31 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.md (two anonymous patterns): New.
......@@ -207,7 +229,7 @@ Tue Oct 30 11:02:31 CET 2001 Jan Hubicka <jh@suse.cz>
* configure.in: Do not assume that gas's version number is the
last thing on the first line of as --version output.
* configure: Regenerate.
* tradcpp.c: Include intl.h. Rename WARNING, ERROR, FATAL to
MT_WARNING, MT_ERROR, MT_FATAL.
(main): Call gcc_init_libintl.
......@@ -257,7 +279,7 @@ Mon Oct 29 19:22:07 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Undo assemble_name change in earlier patch.
Mon Oct 29 21:11:40 2001 Nicola Pero <n.pero@mi.flashnet.it>
* objc/objc-act.c (finish_message_expr): For the GNU runtime: when
determining the type of the receiver, do not check that TREE_CODE
of receiver is CALL_EXPR before calling receiver_is_class_object().
......@@ -407,7 +429,7 @@ Sat Oct 27 17:32:04 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* config/mips/mips.c (mips_output_function_prologue): TSIZE
is now HOST_WIDE_INT; delete unneeded casts.
* config/mips/mips.h: Don't use #elif.
* expr.c (stor_constructor_field): Always call adjust_address.
Copy TARGET before changing its alias set.
(store_field): Likewise, for TO_RTX.
......@@ -467,24 +489,24 @@ Sat Oct 27 12:12:09 CEST 2001 Jan Hubicka <jh@suse.cz>
2001-10-27 Daniel Berlin <dan@cgsoftware.com>
* sched-rgn.c: Remove bitset typedef.
Change bitset to sbitmap in prototypes / variable types.
Remove bbset_size.
Remove edgeset_bits.
Remove edgeset_size.
s/BITSET_ADD/SET_BIT/g
s/BITSET_INVERT/sbitmap_ones/g
s/BITSET_INTER/sbitmap_a_and_b/g
s/BITSET_UNION/sbitmap_a_or_b/g
s/BITSET_DIFFER/sbitmap_difference/g
s/bitset_member/TEST_BIT/g
(BITSET_*): Removed.
(bitset_member): Removed.
(extract_bitlst): Rewrite, now that we have sbitmaps, we can use
EXECUTE_IF_SET_IN_SBITMAP.
(split_edges): Rewrite, use sbitmap functions instead of bitset
operations.
(schedule_region): Allocate/free sbitmaps, rather than bitsets.
* sched-rgn.c: Remove bitset typedef.
Change bitset to sbitmap in prototypes / variable types.
Remove bbset_size.
Remove edgeset_bits.
Remove edgeset_size.
s/BITSET_ADD/SET_BIT/g
s/BITSET_INVERT/sbitmap_ones/g
s/BITSET_INTER/sbitmap_a_and_b/g
s/BITSET_UNION/sbitmap_a_or_b/g
s/BITSET_DIFFER/sbitmap_difference/g
s/bitset_member/TEST_BIT/g
(BITSET_*): Removed.
(bitset_member): Removed.
(extract_bitlst): Rewrite, now that we have sbitmaps, we can use
EXECUTE_IF_SET_IN_SBITMAP.
(split_edges): Rewrite, use sbitmap functions instead of bitset
operations.
(schedule_region): Allocate/free sbitmaps, rather than bitsets.
2001-10-26 Andreas Schwab <schwab@suse.de>
......
......@@ -49,11 +49,6 @@ SUBDIRS =@subdirs@
CONFIG_LANGUAGES = @all_languages@
LANGUAGES = c gcov$(exeext) $(CONFIG_LANGUAGES)
# Languages should create dependencies of $(INTL_TARGETS) on generated
# sources in Make-lang.in. Example:
# $(INTL_TARGETS): $(srcdir)/cp/parse.c
INTL_TARGETS = intl.all intl.install
# Selection of languages to be made during stage1 build.
# This is overridden by configure.
BOOT_LANGUAGES = c @all_boot_languages@
......@@ -341,8 +336,7 @@ INTLDEPS = @INTLDEPS@
LIBICONV = @LIBICONV@
# List of internationalization subdirectories.
POSUB = @POSUB@
INTL_SUBDIRS = intl $(POSUB)
INTL_SUBDIRS = intl
# Change this to a null string if obstacks are installed in the
# system library.
......@@ -836,8 +830,9 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
#
# The only suffixes we want for implicit rules are .c and .o, so clear
# the list and add them. This speeds up GNU Make, and allows -r to work.
# For i18n support, we also need .gmo, .po, .pox.
.SUFFIXES:
.SUFFIXES: .c .o
.SUFFIXES: .c .o .po .pox .gmo
Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
$(xmake_file) $(tmake_file) $(LANG_MAKEFILES)
......@@ -941,7 +936,7 @@ start.encap: native xgcc$(exeext) cpp$(exeext) specs \
rest.encap: $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
# This is what is made with the host's compiler
# whether making a cross compiler or not.
native: config.status auto-host.h intl.all $(LANGUAGES) \
native: config.status auto-host.h intl.all build-@POSUB@ $(LANGUAGES) \
$(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
# Define the names for selecting languages in LANGUAGES.
......@@ -1969,9 +1964,6 @@ intl.o: intl.c $(CONFIG_H) system.h intl.h Makefile
$(top_builddir)/intl/libintl.a: intl.all
# Make sure all the headers are there for xgettext to scan.
$(INTL_TARGETS): $(CONFIG_H) $(srcdir)/c-parse.c
intl.all intl.install intl.uninstall \
intl.mostlyclean intl.clean intl.distclean intl.maintainer-clean:
@for d in $(INTL_SUBDIRS); do \
......@@ -1981,6 +1973,14 @@ intl.all intl.install intl.uninstall \
if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
done
# intl.all and intl.install need config.h to exist, and the files it includes.
# (FIXME: intl/*.c shouldn't need to see insn-foo.h!)
intl.all intl.install: config.h insn-flags.h insn-constants.h
# Make-lang.in should add dependencies of po-generated on any generated
# files which need to be scanned by gettext (usually Yacc-generated parsers).
po-generated: c-parse.c tradcif.c
#
# Remake cpp and protoize.
......@@ -2496,7 +2496,7 @@ install: $(INSTALL_TARGET) ; @true
# Install the driver last so that the window when things are
# broken is small.
install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
$(INSTALL_CPP) install-man install-info intl.install \
$(INSTALL_CPP) install-man install-info intl.install install-@POSUB@ \
lang.install-normal install-driver
# Do nothing while making gcc with a cross-compiler. The person who
......@@ -3337,3 +3337,66 @@ float.h-cross:
echo "#error float.h values not known for cross-compiler" >> t-float.h-cross
echo "#endif" >> t-float.h-cross
mv t-float.h-cross float.h-cross
# Rules for generating translated message descriptions.
# Disabled by autoconf if the tools are not available.
XGETTEXT = @XGETTEXT@
GMSGFMT = @GMSGFMT@
MSGMERGE = msgmerge
PACKAGE = @PACKAGE@
CATALOGS = @CATALOGS@
.PHONY: build- install- build-po install-po update-po
# Dummy rules to deal with dependencies produced by use of
# "build-@POSUB@" and "install-@POSUB@" above, when NLS is disabled.
build-: ; @true
install-: ; @true
build-po: $(CATALOGS)
# This notation should be acceptable to all Make implementations used
# by people who are interested in updating .po files.
update-po: $(CATALOGS:.gmo=.pox)
# Update files in $(srcdir) atomically.
.po.gmo:
test -d po || mkdir po
$(GMSGFMT) --statistics $< -o $@
$(SHELL) $(srcdir)/move-if-change $@ $(srcdir)/$@
# This rule does _not_ copy into $(srcdir). User must do this
# by hand. (User is a translation maintainer and is expected to
# go through the new .po by hand anyway.)
.po.pox:
test -d po || mkdir po
$(MSGMERGE) $< $(srcdir)/po/$(PACKAGE).pot -o $@
install-po:
$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
for cat in $(CATALOGS); do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
echo $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$$dir; \
$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$$dir || exit 1; \
echo $(INSTALL_DATA) $(srcdir)/po/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
$(INSTALL_DATA) $(srcdir)/po/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
done
# Rule for regenerating the message template (gcc.pot).
# Instead of forcing everyone to edit POTFILES.in, which proved impractical,
# this rule has no dependencies and always regenerates gcc.pot. This is
# relatively harmless since the .po files do not directly depend on it.
# Note that exgettext has an awk script embedded in it which requires a
# fairly modern (POSIX-compliant) awk.
$(PACKAGE).pot: po/$(PACKAGE).pot
po/$(PACKAGE).pot: force
test -d po || mkdir po
$(MAKE) po-generated
AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext \
$(XGETTEXT) $(PACKAGE) $(srcdir)
$(SHELL) $(srcdir)/move-if-change $(PACKAGE).pot \
$(srcdir)/po/$(PACKAGE).pot
......@@ -1691,8 +1691,9 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
fi
dnl Construct list of names of catalog files to be constructed.
dnl GCC LOCAL: Tweak for non-recursive po directory build.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
for lang in $LINGUAS; do CATALOGS="$CATALOGS po/$lang$CATOBJEXT"; done
fi
fi
......
......@@ -178,11 +178,11 @@ extern int target_flags;
{ "nofpa", - MASK_FPA, \
N_("Do not generate code for a Sun FPA") }, \
{ "sky", -(MASK_FPA|MASK_68040_ONLY|MASK_68881), \
N_("") }, \
N_("Generate code for a Sun Sky board") }, \
{ "sky", MASK_SKY, \
N_("") }, \
N_("Generate code for a Sun Sky board") }, \
{ "nosky", - MASK_SKY, \
N_("") }, \
N_("Do not use Sky linkage convention") }, \
{ "68881", - (MASK_FPA|MASK_SKY), \
N_("Generate code for a 68881") }, \
{ "68881", MASK_68881, "" }, \
......
This diff is collapsed.
......@@ -923,7 +923,6 @@ if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
fi
AM_GNU_GETTEXT
XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
# Windows32 Registry support for specifying GCC installation paths.
AC_ARG_ENABLE(win32-registry,
......@@ -1903,7 +1902,7 @@ all_boot_languages=
all_compilers=
all_stagestuff=
all_diff_excludes=
all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc'
# List of language makefile fragments.
all_lang_makefiles=
all_headers=
......
2001-10-31 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
* ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
......
......@@ -66,7 +66,7 @@ g++spec.o: $(srcdir)/cp/g++spec.c $(SYSTEM_H) $(GCC_H) $(CONFIG_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
$(INCLUDES) $(srcdir)/cp/g++spec.c)
$(INTL_TARGETS): $(srcdir)/cp/parse.c
po-generated: $(srcdir)/cp/parse.c
# Create the compiler driver for g++.
GXX_OBJS = gcc.o g++spec.o intl.o prefix.o version.o
......
#! /bin/sh
# Wrapper around gettext for GCC sources.
# Copyright 1998 Free Software Foundation, Inc.
# Written by Paul Eggert <eggert@twinsun.com>.
# This file is part of GCC.
# GCC 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.
# GCC 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 GCC; see the file COPYING. If not, write to 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}
# The argument to this wrapper is the xgettext command to be executed.
# Extract the xgettext program name from the rest of the command.
xgettext=${1?}
shift
# Save work if we're just wrapping a no-op.
case $xgettext in
:) exit;;
esac
# Find the files to be scanned, and the directory to scan them from.
directory=.
files=
for i
do
case $i in
--directory=*)
directory=`expr " $i" : ' --directory=\(.*\)'`;;
--files-from=*)
files_from=`expr " $i" : ' --files-from=\(.*\)'`
files=`$AWK '/^[^#]/ { print }' $files_from`;;
esac
done
# Generate keyword options for xgettext,
# by scanning for declarations of functions
# whose parameter names end in "msgid".
generate_keyword_options='
/^[A-Z_a-z].*\(.*msgid[,)]/ {
paren_index = index($0, "(")
name = substr($0, 1, paren_index - 1)
sub(/[^0-9A-Z_a-z]*$/, "", name)
sub(/[ ]+PARAMS/, "", name)
sub(/[ ]+VPARAMS/, "", name)
sub(/.*[^0-9A-Z_a-z]/, "", name)
args = substr($0, paren_index)
sub(/msgid[,)].*/, "", args)
for (n = 1; sub(/^[^,]*,/, "", args); n++) {
continue;
}
if (n == 1) {
keyword = name
} else {
keyword = name ":" n
}
if (! keyword_seen[keyword]++) {
print "--keyword=" keyword
}
}
'
keyword_options=`(
cd $directory &&
$AWK "$generate_keyword_options" $files < /dev/null
)` || exit
# Generate temporary file reflecting the %e strings in the scanned files.
tmp=tmp-emsgids.c
generate_emsgids='
/%e.*}/ {
line = $0
while ((percent_index = index(line, "%e")) != 0) {
line = substr(line, percent_index + 2)
bracket_index = index(line, "}")
if (bracket_index == 0) {
continue
}
msgid = substr(line, 1, bracket_index - 1)
if (index(msgid, "%") != 0) {
continue
}
printf "#line %d \"%s\"\n", FNR, FILENAME
printf "_(\"%s\")\n", msgid
line = substr(line, bracket_index + 1)
}
}
'
(cd $directory &&
$AWK "$generate_emsgids" $files < /dev/null
) > $directory/$tmp || exit
# Run the xgettext command, with temporary added as a file to scan.
"$xgettext" $keyword_options ${1+"$@"} $tmp || exit
# Clean up.
# If we don't get here, `make clean' will remove this file later.
rm -f $directory/$tmp
2001-10-31 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* mangle.c (find_compression_record_match): Don't match compression
......
......@@ -77,7 +77,7 @@ $(GCJ)-cross$(exeext): $(GCJ)$(exeext)
-rm -f $(GCJ)-cross$(exeext)
cp $(GCJ)$(exeext) $(GCJ)-cross$(exeext)
$(INTL_TARGETS): $(srcdir)/java/parse.c $(srcdir)/java/parse-scan.c
po-generated: $(srcdir)/java/parse.c $(srcdir)/java/parse-scan.c
$(srcdir)/java/parse.c: $(srcdir)/java/parse.y
$(BISON) -t --name-prefix=java_ $(BISONFLAGS) \
......
......@@ -63,7 +63,7 @@ objc-parse.o : $(srcdir)/objc/objc-parse.c \
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
-c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION)
$(INTL_TARGETS): $(srcdir)/objc/objc-parse.c
po-generated: $(srcdir)/objc/objc-parse.c
$(srcdir)/objc/objc-parse.c : $(srcdir)/objc/objc-parse.y
cd $(srcdir)/objc; \
$(BISON) $(BISONFLAGS) -o op$$$$.c objc-parse.y ; \
......
2001-10-31 Zack Weinberg <zack@codesourcery.com>
* EXCLUDES: New file.
* exgettext: New helper script; completely rewritten.
* Makefile.in.in, POTFILES.in: Delete.
2001-10-12 Zack Weinberg <zack@codesourcery.com>
* Makefile.in.in: Upgrade to gettext-0.10.40.
......
# This file lists all the sources which should *not* be scanned for
# strings to translate. Only the first word on each line is used; the
# rest is ignored. Only files with an extension of .c or .h are
# examined to begin with.
# These files are part of libgcc, or target headers provided by gcc.
config/rs6000/sol-c0.c
config/float-c4x.h
config/float-i128.h
config/float-i32.h
config/float-i386.h
config/float-i64.h
config/float-m68k.h
config/float-sh.h
config/float-sparc.h
config/float-vax.h
crtstuff.c
frame.h
gbl-ctors.h
libgcc1.c
libgcc1-test.c
libgcc2.c
libgcc2.h
limitx.h
limity.h
longlong.h
unwind-dw2-fde.c
unwind-dw2-fde.h
unwind-dw2.c
unwind-pe.h
unwind-sjlj.c
unwind.h
# These programs are meant to be executed only by GCC maintainers or
# installers. Such files do not need to be translated, as these
# people typically need to be able to read English anyway.
enquire.c
fix-header.c
gen-protos.c
genattr.c
genattrtab.c
gencheck.c
gencodes.c
genconfig.c
genconstants.c
genemit.c
genextract.c
genflags.c
gengenrtl.c
genopinit.c
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
scan-decls.c
scan.c
scan.h
# These files are not yet internationalized, because they contain
# many strings that require a lot of analysis, and are little-used.
mips-tdump.c
mips-tfile.c
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
CC = @CC@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
$(POFILES) $(GMOFILES)
POTFILES = \
CATALOGS = @CATALOGS@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo
.c.o:
$(COMPILE) $<
.po.pox:
$(MAKE) $(PACKAGE).pot
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(PACKAGE).po \
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $(srcdir)/$$cat as" \
"$(DESTDIR)$$dir/$(PACKAGE).mo"; \
fi; \
done
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
done
if test "$(PACKAGE)" = "gettext"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
check: all
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.new.po
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
cp -p $$dir/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(PACKAGE).pot
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
cd $(srcdir); \
catalogs='$(GMOFILES)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
mv -f $$lang.new.po $$lang.po; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$lang.new.po; \
fi; \
done
$(MAKE) update-gmo
update-gmo: Makefile $(GMOFILES)
@:
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
This diff is collapsed.
#! /bin/sh
# Wrapper around gettext for GCC sources.
# Copyright 1998, 2001 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
# 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,
# 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 GNU CC; see the file COPYING. If not, write to
# 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}
# The arguments to this wrapper are: the program to execute, the
# name of the "package", and the path to the source directory.
if [ $# -ne 3 ]
then echo "usage: $0 <xgettext> <package> <srcdir>"
exit 1