]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Makefile.in.in: Make dependencies of a PO file and 'dist' customizable
authorDaiki Ueno <ueno@gnu.org>
Thu, 1 May 2014 04:39:23 +0000 (13:39 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 1 May 2014 08:19:30 +0000 (17:19 +0900)
* Makevars (POFILESDEPS): New variable.
(DISTFILESDEPS): New variable.
* Makefile.in.in ($(POFILES)): Depend on $(POFILESDEPS) instead of
$(srcdir)/$(DOMAIN).pot.
(dist distdir): Run $(DISTFILEDEPS) instead of 'update-po'.

gettext-runtime/po/ChangeLog
gettext-runtime/po/Makefile.in.in
gettext-runtime/po/Makevars

index d3f2cdc3579c9d89881f45d47e01c29f4af5c689..f5af2af5b04f777d10f9f81594821d3cd0950412 100644 (file)
@@ -1,3 +1,12 @@
+2014-05-01  Daiki Ueno  <ueno@gnu.org>
+
+       Makefile.in.in: Make dependencies of a PO file and 'dist' customizable
+       * Makevars (POFILESDEPS): New variable.
+       (DISTFILESDEPS): New variable.
+       * Makefile.in.in ($(POFILES)): Depend on $(POFILESDEPS) instead of
+       $(srcdir)/$(DOMAIN).pot.
+       (dist distdir): Run $(DISTFILEDEPS) instead of 'update-po'.
+
 2014-04-21  Daiki Ueno  <ueno@gnu.org>
 
        * Rules-quot: Use built-in filter if possible.
index fabdc76c9cfac7115efab9ffde1214f95772e01b..5ac3f4c88a30d8815c844d758e3a81b8ce92566d 100644 (file)
@@ -199,9 +199,10 @@ $(srcdir)/$(DOMAIN).pot:
 
 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
 # Note that a PO file is not touched if it doesn't need to be changed.
-$(POFILES): $(srcdir)/$(DOMAIN).pot
+$(POFILES): $(POFILESDEPS)
        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
        if test -f "$(srcdir)/$${lang}.po"; then \
+         test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
          echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
          cd $(srcdir) \
@@ -362,7 +363,7 @@ maintainer-clean: distclean
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 dist distdir:
-       $(MAKE) update-po
+       test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
        @$(MAKE) dist2
 # This is a separate target because 'update-po' must be executed before.
 dist2: stamp-po $(DISTFILES)
index 477dc6763abdc8e651c358f5fa5603ac5771568e..146ee35181a5042c8d374ea70674102f3786c29a 100644 (file)
@@ -54,3 +54,13 @@ USE_MSGCTXT = no
 #   --previous            to keep previous msgids of translated messages,
 #   --quiet               to reduce the verbosity.
 MSGMERGE_OPTIONS =
+
+# This is the list of dependencies of each PO file target.  By
+# default, it includes $(DOMAIN).pot, that means a PO file is updated
+# when the POT file has changed.  Set this to empty to suppress the behavior.
+POFILESDEPS = $(srcdir)/$(DOMAIN).pot
+
+# This is the list of dependencies of the 'dist' rule.  By default, it
+# includes 'update-po', that means all PO files are updated before
+# creating a distribution.  Set this to empty to suppress the behavior.
+DISTFILESDEPS = update-po