From 2f9d32cded855d200db390a194fc1f0487251ca7 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 14 Sep 2003 22:40:38 +0000 Subject: [PATCH] Run distprep target before creating list of files that contain translatable strings in the backend, so that .l and .y files are included. To that end, don't make the .pot file a prerequisite on distprep. --- src/backend/nls.mk | 4 ++-- src/nls-global.mk | 21 ++++++++------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/backend/nls.mk b/src/backend/nls.mk index 7b096bc1cd..e538daca36 100644 --- a/src/backend/nls.mk +++ b/src/backend/nls.mk @@ -1,4 +1,4 @@ -# $Header: /cvsroot/pgsql/src/backend/nls.mk,v 1.6 2003/07/28 00:25:21 tgl Exp $ +# $Header: /cvsroot/pgsql/src/backend/nls.mk,v 1.7 2003/09/14 22:40:38 petere Exp $ CATALOG_NAME := postgres AVAIL_LANGUAGES := cs de es hr hu ru sv tr zh_CN zh_TW GETTEXT_FILES := + gettext-files @@ -6,7 +6,7 @@ GETTEXT_FILES := + gettext-files # include internal messages in the translation list. GETTEXT_TRIGGERS:= errmsg errdetail errhint errcontext postmaster_error yyerror -gettext-files: +gettext-files: distprep find $(srcdir)/ -name '*.c' -print >$@ my-maintainer-clean: diff --git a/src/nls-global.mk b/src/nls-global.mk index eee8df0c5a..d9fa1584fc 100644 --- a/src/nls-global.mk +++ b/src/nls-global.mk @@ -1,4 +1,4 @@ -# $Header: /cvsroot/pgsql/src/nls-global.mk,v 1.7 2002/09/02 22:19:42 petere Exp $ +# $Header: /cvsroot/pgsql/src/nls-global.mk,v 1.8 2003/09/14 22:40:38 petere Exp $ # Common rules for Native Language Support (NLS) # @@ -42,17 +42,15 @@ endif all-po: $(MO_FILES) -distprep: $(srcdir)/po/$(CATALOG_NAME).pot - %.mo: %.po $(MSGFMT) -o $@ $< ifdef XGETTEXT ifeq ($(word 1,$(GETTEXT_FILES)),+) -$(srcdir)/po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) +po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) -f $< else -$(srcdir)/po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) +po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) # Change to srcdir explicitly, don't rely on $^. That way we get # consistent #: file references in the po files. $(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(GETTEXT_FILES) @@ -81,9 +79,7 @@ uninstall-po: clean-po: rm -f $(MO_FILES) @rm -f $(addsuffix .old, $(PO_FILES)) - -maintainer-clean-po: clean-po - rm -f $(srcdir)/po/$(CATALOG_NAME).pot + rm -f po/$(CATALOG_NAME).pot maintainer-check-po: $(PO_FILES) @@ -92,10 +88,10 @@ maintainer-check-po: $(PO_FILES) done -init-po: $(srcdir)/po/$(CATALOG_NAME).pot +init-po: po/$(CATALOG_NAME).pot -update-po: $(srcdir)/po/$(CATALOG_NAME).pot +update-po: po/$(CATALOG_NAME).pot ifdef MSGMERGE @for lang in $(LANGUAGES); do \ echo "merging $$lang:"; \ @@ -117,10 +113,9 @@ all: all-po install: install-po installdirs: installdirs-po uninstall: uninstall-po -clean distclean: clean-po -maintainer-clean: maintainer-clean-po +clean distclean maintainer-clean: clean-po maintainer-check: maintainer-check-po .PHONY: all-po install-po installdirs-po uninstall-po clean-po \ - maintainer-clean-po maintainer-check-po init-po update-po + maintainer-check-po init-po update-po .SILENT: installdirs-po -- 2.49.0