aboutsummaryrefslogtreecommitdiff
path: root/ld/po/Make-in
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-02-24 18:50:21 +1030
committerAlan Modra <amodra@gmail.com>2018-02-26 10:51:12 +1030
commit33589acbfea909ca2a26b977ff2f672332990747 (patch)
treec7f59a4a02311e08068b1defd4a5998b8eecff9c /ld/po/Make-in
parente95b887f85a192eb1597cd5d358673520029ad14 (diff)
downloadgdb-33589acbfea909ca2a26b977ff2f672332990747.zip
gdb-33589acbfea909ca2a26b977ff2f672332990747.tar.gz
gdb-33589acbfea909ca2a26b977ff2f672332990747.tar.bz2
ld message translation for emultempl and emulparams
Most of the emultempl/*.em error/warning messages do not currently appear in ld.pot, and fixing that is not simply a matter of adding missing files to POTFILES. The difficulty is the shell-script quoting, for example aarch64elf.em:PARSE_AND_LIST_OPTIONS "Don'\''t". I suppose you could avoid contractions like "don't" but I'm unsure as to whether gettext could handle everything in the emulparams scripts. The right thing to do is feed the generated C files to gettext, as this patch does. The patch just copies what is already done in bfd/ for generated files. * Makefile.am (EMULATION_FILES, POTFILES): Delete. (SRC_POTFILES, BLD_POTFILES): Define. (po/POTFILES.in): Delete rule. (po/SRC-POTFILES.in, po/BLD-POTFILES.in): New rules. * configure.ac: Add AC_CONFIG_COMMANDS to create po/Makefile. * po/Make-in (DISTFILES): Remove POTFILES.in, add SRC-POTFILES.in and BLD-POTFILES.in. (POTFILES): Delete. (SRC-POTFILES, BLD-POTFILES): Define place marker. (ld.pot): Build from SRC-POTFILES plus BLD-POTFILES. (distclean, maintainer-clean): Tidy up new files. (POTFILES, POTFILES.in): Delete rules. (SRC-POTFILES, BLD-POTFILES, SRC-POTFILES.in, BLD-POTFILES.in): New rules. (Makefile): Depend on SRC-POTFILES and BLD-POTFILES. * po/SRC-POTFILES.in: Rename from po/POTFILES.in. * po/BLD-POTFILES.in: New file. * Makefile.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'ld/po/Make-in')
-rw-r--r--ld/po/Make-in41
1 files changed, 30 insertions, 11 deletions
diff --git a/ld/po/Make-in b/ld/po/Make-in
index 7e38f5d..3f7064f 100644
--- a/ld/po/Make-in
+++ b/ld/po/Make-in
@@ -50,10 +50,12 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES = cat-id-tbl.c
POFILES = @POFILES@
GMOFILES = @GMOFILES@
-DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+DISTFILES = ChangeLog Makefile.in.in SRC-POTFILES.in BLD-POTFILES.in $(PACKAGE).pot \
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
-POTFILES = \
+SRC-POTFILES = \
+
+BLD-POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
@@ -86,11 +88,16 @@ all: all-@USE_NLS@
all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
-$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+$(srcdir)/$(PACKAGE).pot: $(SRC-POTFILES) $(BLD-POTFILES)
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
- --add-comments -C --keyword=_ --keyword=N_ \
+ --add-comments --keyword=_ --keyword=N_ \
+ --msgid-bugs-address=bug-binutils@gnu.org \
+ --files-from=$(srcdir)/SRC-POTFILES.in
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=.. \
+ --add-comments --keyword=_ --keyword=N_ \
+ --join-existing \
--msgid-bugs-address=bug-binutils@gnu.org \
- --files-from=$(srcdir)/POTFILES.in
+ --files-from=$(srcdir)/BLD-POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
@@ -198,12 +205,13 @@ mostlyclean:
clean: mostlyclean
distclean: clean
- rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+ rm -f Makefile Makefile.in *.mo *.msg *.cat *.cat.m
+ rm -f SRC-POTFILES BLD-POTFILES
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)
+ rm -f $(GMOFILES) SRC-POTFILES.in BLD-POTFILES.in
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
@@ -232,7 +240,7 @@ update-po: Makefile
fi; \
done
-POTFILES: POTFILES.in
+SRC-POTFILES: SRC-POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
@@ -245,10 +253,21 @@ POTFILES: POTFILES.in
&& chmod a-w $@-t \
&& mv $@-t $@ )
-POTFILES.in: @MAINT@ ../Makefile
- cd .. && $(MAKE) po/POTFILES.in
+BLD-POTFILES: BLD-POTFILES.in
+ rm -f $@-t $@ \
+ && sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ ../& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//' > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@
+
+SRC-POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/SRC-POTFILES.in
+
+BLD-POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/BLD-POTFILES.in
-Makefile: Make-in ../config.status POTFILES
+Makefile: Make-in ../config.status SRC-POTFILES BLD-POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
CONFIG_HEADERS= $(SHELL) ./config.status