From 7c52a0d9333c47f3b422f20104f687e6bfa25de3 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 7 Mar 2005 19:54:46 +0000 Subject: If $(DOMAIN).pot does not exist, make stamp-po a nop and don't distribute $(DOMAIN).pot and stamp-po. --- gettext-runtime/po/ChangeLog | 8 ++++++++ gettext-runtime/po/Makefile.in.in | 26 +++++++++++++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) (limited to 'gettext-runtime/po') diff --git a/gettext-runtime/po/ChangeLog b/gettext-runtime/po/ChangeLog index 11fd64b..9398667 100644 --- a/gettext-runtime/po/ChangeLog +++ b/gettext-runtime/po/ChangeLog @@ -1,3 +1,11 @@ +2005-03-06 Bruno Haible + + * Makefile.in.in (DISTFILES): Remove $(DOMAIN).pot, stamp-po. + (stamp-po): Do nothing if $(DOMAIN).pot does not exist. + (dist2): Depend on stamp-po. If $(DOMAIN).pot exists, distribute also + $(DOMAIN).pot and stamp-po. + Reported by Alexandre Duret-Lutz . + 2005-02-24 Bruno Haible * gettext-0.14.2 released. diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 76516c1..30b8d20 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -8,7 +8,7 @@ # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # -# Origin: gettext-0.14.2 +# Origin: gettext-0.14.3 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -47,7 +47,7 @@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) -DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) @@ -80,6 +80,12 @@ all: all-@USE_NLS@ all-yes: stamp-po all-no: +# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no +# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because +# we don't want to bother translators with empty POT files). We assume that +# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. +# In this case, stamp-po is a nop (i.e. a phony target). + # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, @@ -89,10 +95,13 @@ all-no: # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot - test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) - @echo "touch stamp-po" - @echo timestamp > stamp-poT - @mv stamp-poT stamp-po + test ! -f $(srcdir)/$(DOMAIN).pot || \ + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) + @test ! -f $(srcdir)/$(DOMAIN).pot || { \ + echo "touch stamp-po" && \ + echo timestamp > stamp-poT && \ + mv stamp-poT stamp-po; \ + } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source @@ -295,11 +304,14 @@ dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. -dist2: $(DISTFILES) +dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + dists="$$dists $(DOMAIN).pot stamp-po"; \ + fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ -- cgit v1.1