* 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-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.
# 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) \
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)
# --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