]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
po: Make "make maintainer-clean" erase the .pot file.
authorBruno Haible <bruno@clisp.org>
Wed, 24 Oct 2018 20:08:10 +0000 (22:08 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 24 Oct 2018 20:08:10 +0000 (22:08 +0200)
Rationale:
<https://www.gnu.org/prep/standards/html_node/Standard-Targets.html>
<https://www.gnu.org/software/automake/manual/html_node/Clean.html>

* NEWS: Mention the change.
* gettext-runtime/po/Makefile.in.in (maintainer-clean): Remove the .pot file.
* gettext-tools/examples/hello-*/po/Makefile.am (MAINTAINERCLEANFILES): Add
the .pot file.
* gettext-tools/examples/po/Makefile.am (MAINTAINERCLEANFILES): Likewise.
* gettext-tools/examples/check-examples (func_check_maintainerclean,
func_check_maintainerclean_vpath): Verify the .pot file is removed after
'make maintainer-clean', except when using the older Makefile.in.in
infrastructure.

25 files changed:
NEWS
gettext-runtime/po/Makefile.in.in
gettext-tools/examples/check-examples
gettext-tools/examples/hello-c++-qt/po/Makefile.am
gettext-tools/examples/hello-c++-wxwidgets/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-qtjambi/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

diff --git a/NEWS b/NEWS
index aee71951ad5d46e75031bddfaefd36ae502da116..9de1cbd491916f96334f8c4f683397deb575f74e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,9 @@
     compliant.  There is no conflict any more between these replacements
     and other possible replacements provided by gnulib or mingw.
 
+* Improvements for maintainers:
+  - The .pot file in a 'po' directory is now erased by "make maintainer-clean".
+
 Version 0.19.8 - June 2016
 
 * Support for reproducible builds:
index 70309a9f278ab6d2f1113a38333ed059622fd280..77d78cd591851f6fc33756626773d6d55fdce4d1 100644 (file)
@@ -383,7 +383,7 @@ distclean: clean
 maintainer-clean: distclean
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
-       rm -f stamp-po $(GMOFILES)
+       rm -f $(srcdir)/$(DOMAIN).pot stamp-po $(GMOFILES)
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 dist distdir:
index d29b4dd9f2fd9e70f7a5ba3e28c4cb365fd78b83..406edf37e11a43cfdb506793a26465adac632dc9 100755 (executable)
@@ -244,9 +244,9 @@ func_check_maintainerclean ()
     fi
   fi
   func_maintainerclean "$sample"
-  # TODO: Remove .pot files workaround.
+  # TODO: Remove .pot files workaround after next release.
   # TODO: Remove .po~ files workaround.
-  LC_ALL=C diff -r -q "$sample.bak" "$sample" | sed -n -e 's/^Only in //p' | sed -e 's|: |/|' | grep "^${sample}/" | grep -v '\.pot$' | grep -v '\.po~$' > "$sample.out"
+  LC_ALL=C diff -r -q "$sample.bak" "$sample" | sed -n -e 's/^Only in //p' | sed -e 's|: |/|' | grep "^${sample}/" | { if test -f "$sample"/po/Makevars || test "$sample" = hello-objc-gnustep; then grep -v '\.pot$'; else cat; fi; } | grep -v '\.po~$' > "$sample.out"
   func_autoclean "$sample"
   if ! test -s "$sample.out"; then
     rm -f "$sample.out"
@@ -317,9 +317,9 @@ func_check_maintainerclean_vpath ()
         fi
       fi
       func_maintainerclean "$sample" build
-      # TODO: Remove .pot files workaround.
+      # TODO: Remove .pot files workaround after next release.
       # TODO: Remove .po~ files workaround.
-      find "$sample"/build -type f | LC_ALL=C sort | grep -v '\.pot$' | grep -v '\.po~$' > "$sample.out"
+      find "$sample"/build -type f | LC_ALL=C sort | { if test -f "$sample"/po/Makevars; then grep -v '\.pot$'; else cat; fi; } | grep -v '\.po~$' > "$sample.out"
       rm -rf "$sample"/build
       func_autoclean "$sample"
       if ! test -s "$sample.out"; then
index 038f114c1cca6dfbac5c28ee7052b6fbe7ff4cd1..6a73ec55c7b009e1964d42f78c44ad741c74e23d 100644 (file)
@@ -262,7 +262,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(QMFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(QMFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(QMFILES)
 
index 8c4a5cc650c4d1f719fd08db14e97fd4a4ac7250..9725c79837cbc5dbac5b029cb8e309606e15208a 100644 (file)
@@ -327,7 +327,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index f17f14297280c73675ba6f4efd5ad7361f39af72..06c654946ba6548ee0f8a883e0af32f9aba90a03 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 89a064b5e9e7111ca40ef8210fb02ccb8b46c578..c89ac0e7b804c080be0ccded3bd264c093fe9a94 100644 (file)
@@ -253,7 +253,7 @@ MOSTLYCLEANFILES += remove-potcdate.sed
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
-MAINTAINERCLEANFILES = stamp-po
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po
 maintainer-clean-local:
        if test -n "$(RESOURCESDLLFILES)"; then \
          for file in $(RESOURCESDLLFILES); do \
index 89a064b5e9e7111ca40ef8210fb02ccb8b46c578..c89ac0e7b804c080be0ccded3bd264c093fe9a94 100644 (file)
@@ -253,7 +253,7 @@ MOSTLYCLEANFILES += remove-potcdate.sed
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
-MAINTAINERCLEANFILES = stamp-po
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po
 maintainer-clean-local:
        if test -n "$(RESOURCESDLLFILES)"; then \
          for file in $(RESOURCESDLLFILES); do \
index fc0a39678e6cc0f5194dac00f3d1ac21b589b6e8..239e83accfbd43c23874e29d4ab7b68155d55ef4 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 1ddd76239999c5eaf450a5a6d0ff4c232bd6a890..ab2971632fd9f3860c3f00eb3153aceed7f15092 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 080b897ffb732c91fedf8c70628796cad364b4a8..d4937f1817938065bb485dda32a802b3afe6b181 100644 (file)
@@ -222,7 +222,9 @@ MOSTLYCLEANFILES += remove-potcdate.sed
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
-MAINTAINERCLEANFILES = stamp-po $(DOMAIN).properties $(PROPERTIESFILES) $(CLASSFILES)
+MAINTAINERCLEANFILES = \
+  $(DOMAIN).pot stamp-po \
+  $(DOMAIN).properties $(PROPERTIESFILES) $(CLASSFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(DOMAIN).properties $(PROPERTIESFILES)
 
index 080b897ffb732c91fedf8c70628796cad364b4a8..d4937f1817938065bb485dda32a802b3afe6b181 100644 (file)
@@ -222,7 +222,9 @@ MOSTLYCLEANFILES += remove-potcdate.sed
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
-MAINTAINERCLEANFILES = stamp-po $(DOMAIN).properties $(PROPERTIESFILES) $(CLASSFILES)
+MAINTAINERCLEANFILES = \
+  $(DOMAIN).pot stamp-po \
+  $(DOMAIN).properties $(PROPERTIESFILES) $(CLASSFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(DOMAIN).properties $(PROPERTIESFILES)
 
index 080b897ffb732c91fedf8c70628796cad364b4a8..d4937f1817938065bb485dda32a802b3afe6b181 100644 (file)
@@ -222,7 +222,9 @@ MOSTLYCLEANFILES += remove-potcdate.sed
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
-MAINTAINERCLEANFILES = stamp-po $(DOMAIN).properties $(PROPERTIESFILES) $(CLASSFILES)
+MAINTAINERCLEANFILES = \
+  $(DOMAIN).pot stamp-po \
+  $(DOMAIN).properties $(PROPERTIESFILES) $(CLASSFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(DOMAIN).properties $(PROPERTIESFILES)
 
index 080b897ffb732c91fedf8c70628796cad364b4a8..d4937f1817938065bb485dda32a802b3afe6b181 100644 (file)
@@ -222,7 +222,9 @@ MOSTLYCLEANFILES += remove-potcdate.sed
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
-MAINTAINERCLEANFILES = stamp-po $(DOMAIN).properties $(PROPERTIESFILES) $(CLASSFILES)
+MAINTAINERCLEANFILES = \
+  $(DOMAIN).pot stamp-po \
+  $(DOMAIN).properties $(PROPERTIESFILES) $(CLASSFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(DOMAIN).properties $(PROPERTIESFILES)
 
index 1f4fd862e33cb2f9293bd4e76c249a56851ca443..bceb8fc832f7afae5f730bc6b93bbba051399980 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 0d8bd466c74898bb225ffd6596d345b164411af6..8d144f0f1f165f173e2e95889dcfadf6e923e8c0 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 9c1948d2500f0c0a280feeeb42b622d953764978..857f3c4c698afa688f66c454d04bb46a4966026d 100644 (file)
@@ -331,7 +331,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 4c5baa62df2756c2f35d9fa1e13a2993202a9662..87cf2a53f13734ffe1ab3817b33bcc785becf446 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 6a93f73c96d99b8ceba4e68933a88c8587603a24..22b27e81514cfdfa6845341076808d59d1818595 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index d8e6c054b1895f56758f07caeef37fc0d3ad81a9..b70e8d6d8448e030926a4722d7626c41a3747144 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 6fa217db30b7e8d13f2f81dc013162a2ff42577f..51428b0414a9c47c5eb3ec864e6b8cd46498d9f2 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 872fb8791b35121dc6498b18d5ed9476c7138740..7abdeb52e8896030376318db6a8419b5f6d48bc8 100644 (file)
@@ -249,7 +249,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(MSGFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(MSGFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(MSGFILES)
 
index 872fb8791b35121dc6498b18d5ed9476c7138740..7abdeb52e8896030376318db6a8419b5f6d48bc8 100644 (file)
@@ -249,7 +249,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(MSGFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(MSGFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(MSGFILES)
 
index 5bc3a70ee66dca4c59f05d950a438ce000f02efa..270388b822e66675a857b231ad73e070dc7e5578 100644 (file)
@@ -321,7 +321,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(GMOFILES)
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
 
index 5291c1b0f8cc0933ff925b28d7cc4e6eb3db065c..82d0bccd8f417a0d4c3a02bb18c67776f7678f03 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/examples/po subdirectory of GNU gettext
-## Copyright (C) 1995-1998, 2000-2007, 2009, 2016 Free Software Foundation,
+## Copyright (C) 1995-1998, 2000-2007, 2009, 2014, 2018 Free Software Foundation,
 ## Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
@@ -331,7 +331,7 @@ MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 MOSTLYCLEANFILES += *.o
 
-MAINTAINERCLEANFILES = stamp-po $(SMALLPOTS)
+MAINTAINERCLEANFILES = $(DOMAIN).pot stamp-po $(SMALLPOTS)
 
 EXTRA_DIST = remove-potcdate.sin xsmallpot.sh mmsmallpo.sh LINGUAS \
   $(POFILES)