From ba526aae3a8b3eff6bf8b895ef7a45bd557e27ac Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 25 Nov 2020 08:47:54 -0500 Subject: [PATCH] po: reapply local e2fsprogs chages to po/Makefile.in.in These are the changes which are needed after running gettextize to update to gettext 0.19.8 in the previous commit. * Add support for maintainer mode (which doesn't do as much given that gettext now has settings in Makevars which allows us to suppress automatic updates of the po and gmo files) * Add support to expand the '@' abbreviations in e2fsck/problem.c and give an explanation of how they work for translators * Add support for configure --enable-verbose-makecmds and default to "kernel-style" quieter make output --- this makes it easier to see warnings and errors by suppressing the distracting details. * Teach the makefile where to find the generated error table C files in the build directory. * Add make targets (e.g., all-static, fullcheck, coverage.txt) which are required by the top-level Makefile. Signed-off-by: Theodore Ts'o --- po/Makefile.in.in | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 38c293d..f21852f 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -96,8 +96,8 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: - @echo "$(MSGFMT) -c -o $@ $<"; \ - $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + $(E) "$(MSGFMT) -c -o $@ $<"; \ + $(Q) $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ @@ -112,8 +112,11 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) all: all-@USE_NLS@ -all-yes: stamp-po +all-yes: @MAINTAINER_CMT@stamp-po all-no: +all-static: +depend: +coverage.txt: # Ensure that the gettext macros and this Makefile.in.in are in sync. CHECK_MACRO_VERSION = \ @@ -155,7 +158,8 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # The determination of whether the package xyz is a GNU one is based on the # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. -$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed +$(DOMAIN).pot-update: $(srcdir)/POTFILES.in remove-potcdate.sed \ + $(srcdir)/at-expand.pl package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ @@ -184,6 +188,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --directory=$(top_builddir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ @@ -191,6 +196,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --directory=$(top_builddir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ @@ -199,6 +205,9 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac + perl $(srcdir)/at-expand.pl < $(DOMAIN).po > $(DOMAIN).po.new + mv $(DOMAIN).po $(DOMAIN).po.bak + mv $(DOMAIN).po.new $(DOMAIN).po test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot-header; then \ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ @@ -369,7 +378,7 @@ uninstall-data-yes: done; \ done -check: all +fullcheck check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: @@ -377,6 +386,7 @@ mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -f $(DOMAIN).po.bak rm -fr *.o clean: mostlyclean @@ -474,7 +484,7 @@ update-gmo: Makefile $(GMOFILES) # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ - && @SHELL@ ./config.status $(subdir)/$@.in po-directories + && CONFIG_FILES=$(subdir)/$@.in @SHELL@ ./config.status po-directories force: -- 1.8.3.1