Run distprep target before creating list of files that contain translatable
authorPeter Eisentraut
Sun, 14 Sep 2003 22:40:38 +0000 (22:40 +0000)
committerPeter Eisentraut
Sun, 14 Sep 2003 22:40:38 +0000 (22:40 +0000)
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
src/nls-global.mk

index 7b096bc1cd806394badfab7f5d13240e689e274c..e538daca3633f1dd0bca5b634245fa63f2ebe637 100644 (file)
@@ -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:
index eee8df0c5a3783ff9f9e29030aa216eac8e67d9a..d9fa1584fc5cf7d896531894a4cb88997adccb2f 100644 (file)
@@ -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