]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
If $(DOMAIN).pot does not exist, make stamp-po a nop and don't distribute
authorBruno Haible <bruno@clisp.org>
Mon, 7 Mar 2005 19:54:46 +0000 (19:54 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:21 +0000 (12:12 +0200)
$(DOMAIN).pot and stamp-po.

25 files changed:
gettext-runtime/po/ChangeLog
gettext-runtime/po/Makefile.in.in
gettext-tools/examples/ChangeLog
gettext-tools/examples/hello-c++-qt/po/Makefile.am
gettext-tools/examples/hello-clisp/po/Makefile.am
gettext-tools/examples/hello-csharp-forms/po/Makefile.am
gettext-tools/examples/hello-csharp/po/Makefile.am
gettext-tools/examples/hello-gawk/po/Makefile.am
gettext-tools/examples/hello-guile/po/Makefile.am
gettext-tools/examples/hello-java-awt/po/Makefile.am
gettext-tools/examples/hello-java-swing/po/Makefile.am
gettext-tools/examples/hello-java/po/Makefile.am
gettext-tools/examples/hello-librep/po/Makefile.am
gettext-tools/examples/hello-pascal/po/Makefile.am
gettext-tools/examples/hello-perl/po/Makefile.am
gettext-tools/examples/hello-php/po/Makefile.am
gettext-tools/examples/hello-python/po/Makefile.am
gettext-tools/examples/hello-sh/po/Makefile.am
gettext-tools/examples/hello-smalltalk/po/Makefile.am
gettext-tools/examples/hello-tcl-tk/po/Makefile.am
gettext-tools/examples/hello-tcl/po/Makefile.am
gettext-tools/examples/hello-ycp/po/Makefile.am
gettext-tools/examples/po/Makefile.am
gettext-tools/po/ChangeLog
gettext-tools/po/Makefile.in.in

index 11fd64b9caf1f3b9b01ae09a73290e2848d2b2fa..9398667dceaa01f302dd4100a9e2a845f681da58 100644 (file)
@@ -1,3 +1,11 @@
+2005-03-06  Bruno Haible  <bruno@clisp.org>
+
+       * 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 <adl@src.lip6.fr>.
+
 2005-02-24  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.14.2 released.
index 76516c1af6f8889344b110e183be4c1bae79adb1..30b8d2021da701ade87b11096730784705605e71 100644 (file)
@@ -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; \
index 41be494efcdec3233e609fbcbfa09576cc9da8f7..5543d74836facadf157189de62285df5ff924508 100644 (file)
@@ -1,3 +1,11 @@
+2005-03-06  Bruno Haible  <bruno@clisp.org>
+
+       * po/Makefile.am, hello-*/po/Makefile.am (stamp-po): Do nothing if
+       $(DOMAIN).pot does not exist.
+       (EXTRA_DIST): Remove $(DOMAIN).pot, stamp-po.
+       (distdir1): If $(DOMAIN).pot exists, distribute also $(DOMAIN).pot and
+       stamp-po.
+
 2005-02-24  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.14.2 released.
index d09872a73299f044fb3bba8a8a50a650883a7487..67bb7e03cb34af062031d6114363d0e6d0e6fa37 100644 (file)
@@ -89,6 +89,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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 $(QMFILES) 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,
@@ -98,10 +104,13 @@ all-local-no:
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       test -z "$(QMFILES)" || $(MAKE) $(QMFILES)
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         test -z "$(QMFILES)" || $(MAKE) $(QMFILES)
+       @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
@@ -190,12 +199,18 @@ MOSTLYCLEANFILES += *.o
 
 MAINTAINERCLEANFILES = stamp-po $(QMFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(QMFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(QMFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 8e4fa6f95bd4bf8a7ebb06759e9a71573c8923dd..f60804a60ef6e52fe715a1e0ed730fd082cc7164 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index d2fe4a3664daae3257f30b8e9eed3a5125c22297..51d2b8417c184abca1910540325a1f5f50c21211 100644 (file)
@@ -76,6 +76,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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 $(RESOURCESDLLFILES) 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,
@@ -85,10 +91,13 @@ all-local-no:
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       test -z "$(RESOURCESDLLFILES)" || $(MAKE) $(RESOURCESDLLFILES)
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         test -z "$(RESOURCESDLLFILES)" || $(MAKE) $(RESOURCESDLLFILES)
+       @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
@@ -179,12 +188,18 @@ MOSTLYCLEANFILES += core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.p
 
 MAINTAINERCLEANFILES = stamp-po $(RESOURCESDLLFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(RESOURCESDLLFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(RESOURCESDLLFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index d2fe4a3664daae3257f30b8e9eed3a5125c22297..51d2b8417c184abca1910540325a1f5f50c21211 100644 (file)
@@ -76,6 +76,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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 $(RESOURCESDLLFILES) 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,
@@ -85,10 +91,13 @@ all-local-no:
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       test -z "$(RESOURCESDLLFILES)" || $(MAKE) $(RESOURCESDLLFILES)
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         test -z "$(RESOURCESDLLFILES)" || $(MAKE) $(RESOURCESDLLFILES)
+       @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
@@ -179,12 +188,18 @@ MOSTLYCLEANFILES += core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.p
 
 MAINTAINERCLEANFILES = stamp-po $(RESOURCESDLLFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(RESOURCESDLLFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(RESOURCESDLLFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 00c19ee5ceaee7f2cbb183ac34c50767e256349b..086d3aa64a9e7a2351ba85caf6c70cc830442e8c 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 3389c55576be87b74a4521c5e0a41c2506b769fa..d2b74a2d1856ebfc7dcef1aa041e1bc1340308c7 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 664e8b0ac27bd663cd3bc6e7496276a0f50df900..b89bcdcb0e485b9d53e45b873ff4ef69449b82bd 100644 (file)
@@ -74,6 +74,12 @@ SUFFIXES = .po .sed .sin .nop .po-create .po-update
 
 all-local: stamp-po
 
+# $(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 $(PROPERTIESFILES) 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,
@@ -83,10 +89,13 @@ all-local: stamp-po
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       $(MAKE) update-properties
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         $(MAKE) update-properties
+       @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
@@ -148,12 +157,18 @@ MOSTLYCLEANFILES += core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.p
 
 MAINTAINERCLEANFILES = stamp-po
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 664e8b0ac27bd663cd3bc6e7496276a0f50df900..b89bcdcb0e485b9d53e45b873ff4ef69449b82bd 100644 (file)
@@ -74,6 +74,12 @@ SUFFIXES = .po .sed .sin .nop .po-create .po-update
 
 all-local: stamp-po
 
+# $(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 $(PROPERTIESFILES) 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,
@@ -83,10 +89,13 @@ all-local: stamp-po
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       $(MAKE) update-properties
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         $(MAKE) update-properties
+       @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
@@ -148,12 +157,18 @@ MOSTLYCLEANFILES += core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.p
 
 MAINTAINERCLEANFILES = stamp-po
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 664e8b0ac27bd663cd3bc6e7496276a0f50df900..78dc29775c82ee286d390d62c92b46eee931aff8 100644 (file)
@@ -74,6 +74,12 @@ SUFFIXES = .po .sed .sin .nop .po-create .po-update
 
 all-local: stamp-po
 
+# $(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 $(PROPERTIESFILES) 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,
@@ -83,10 +89,13 @@ all-local: stamp-po
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       $(MAKE) update-properties
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) \
+         $(MAKE) update-properties
+       @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
@@ -148,12 +157,18 @@ MOSTLYCLEANFILES += core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.p
 
 MAINTAINERCLEANFILES = stamp-po
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 6f9ceea572ede3afee1bca1520f0c3a327a65cc5..f1b173c9b0de7176eb4797a4a843cf95c64530bb 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 0301905016299aa7d1a4112ab091dcdf3771635d..403c7be167f95ef84f236a10ec099d6c5740466f 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index aacfaf8a80eff5be8cfff60adcb741aeb5059c9b..b38af3dc8adcc16643729050667a0c500aa1e869 100644 (file)
@@ -100,6 +100,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -109,10 +115,13 @@ all-local-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
@@ -267,12 +276,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index ccdf2dd60a9057e81c87c6e496917fdf12f12419..ad1f1b12f29341f48a6d3498c6b9c6587495516f 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 4c91203fb5b442ecc0325838dc07e0cdf7e91059..42ffd56527a58402ec88b09c4cc01603b03ba420 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 5841d9777d314b5101e7279f15ff5ed445b32400..b6e44af660bb18bd12c39f1fc25623c86c4015bb 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 4e56605855a3b59cf7a1a9bea70be11334ce48b2..ae2d7660055c120c45dbe81d89e3d115d6fddce4 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 9157f2e734a64590b02d92b8751b8c3bf203d450..45d0e470fd6f495cbcb5381ea2e9b68ccf6c7095 100644 (file)
@@ -74,6 +74,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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 $(MSGFILES) 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,
@@ -83,10 +89,13 @@ all-local-no:
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       test -z "$(MSGFILES)" || $(MAKE) $(MSGFILES)
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         test -z "$(MSGFILES)" || $(MAKE) $(MSGFILES)
+       @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
@@ -175,12 +184,18 @@ MOSTLYCLEANFILES += *.o
 
 MAINTAINERCLEANFILES = stamp-po $(MSGFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(MSGFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(MSGFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 9157f2e734a64590b02d92b8751b8c3bf203d450..45d0e470fd6f495cbcb5381ea2e9b68ccf6c7095 100644 (file)
@@ -74,6 +74,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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 $(MSGFILES) 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,
@@ -83,10 +89,13 @@ all-local-no:
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       test -z "$(MSGFILES)" || $(MAKE) $(MSGFILES)
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         test -z "$(MSGFILES)" || $(MAKE) $(MSGFILES)
+       @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
@@ -175,12 +184,18 @@ MOSTLYCLEANFILES += *.o
 
 MAINTAINERCLEANFILES = stamp-po $(MSGFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(MSGFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(MSGFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 10e168b40d16b298844a74b4ab4138e5943a18a5..42766b66f83f00de47b6dcbf318f9f340da5cf31 100644 (file)
@@ -90,6 +90,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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,
@@ -99,10 +105,13 @@ all-local-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
@@ -257,12 +266,18 @@ DISTCLEANFILES = *.mo
 
 MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
 
-EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
+EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 8ff78e4678697fbc5d6b07c3d564e34a0127fcce..bd1fb23287e524078cf6bbd5f4f82f15477d0e01 100644 (file)
@@ -149,6 +149,12 @@ all-local: all-local-@USE_NLS@
 all-local-yes: stamp-po
 all-local-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) is 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,
@@ -158,9 +164,11 @@ all-local-no:
 # $(POFILES) has been designed to not touch files that don't need to be
 # changed.
 stamp-po: $(srcdir)/$(DOMAIN).pot
-       @echo "touch stamp-po"
-       @echo timestamp > stamp-poT
-       @mv stamp-poT stamp-po
+       @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
@@ -305,12 +313,18 @@ DISTCLEANFILES = $(SMALLPOTS)
 MAINTAINERCLEANFILES = stamp-po
 
 EXTRA_DIST = remove-potcdate.sin xsmallpot.sh mmsmallpo.sh LINGUAS \
-  $(DOMAIN).pot stamp-po $(POFILES)
+  $(POFILES)
 
 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
 #distdir: distdir1
 distdir1:
        $(MAKE) update-po
+       if test -f $(srcdir)/$(DOMAIN).pot; then
+         for file in $(DOMAIN).pot stamp-po; do \
+           if test -f $$file; then d=.; else d=$(srcdir); fi; \
+           cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+         done; \
+       fi
 
 update-po: Makefile
        $(MAKE) $(DOMAIN).pot-update
index 05e8cbb5c4c97a8c19ffab90f426bf9f490ac257..a37b87e77caad181ea026502d6288a1127857531 100644 (file)
@@ -1,3 +1,11 @@
+2005-03-06  Bruno Haible  <bruno@clisp.org>
+
+       * 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 <adl@src.lip6.fr>.
+
 2005-02-24  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.14.2 released.
index 76516c1af6f8889344b110e183be4c1bae79adb1..30b8d2021da701ade87b11096730784705605e71 100644 (file)
@@ -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; \