[parted-devel] [PATCH] Make it so "make distcheck" passes.

Jim Meyering jim at meyering.net
Wed Feb 14 12:37:45 CET 2007


* doc/po4a.mk (updatepo): Don't choke when *.$(lang).po matches no file.
* doc/C/Makefile.am (updatepo): Don't do anything when $(srcdir) is not writable.

Signed-off-by: Jim Meyering <jim at meyering.net>
---
 doc/C/Makefile.am |    2 ++
 doc/po4a.mk       |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/doc/C/Makefile.am b/doc/C/Makefile.am
index 863e0d8..5a9ac21 100644
--- a/doc/C/Makefile.am
+++ b/doc/C/Makefile.am
@@ -9,8 +9,10 @@ man_MANS = $(dist_man_MANS)
 .PHONY: updatepo
 # Update the POT in srcdir
 # Make sure the update does not only consist in a new POT-Creation-Date
+# Don't do anything if $(srcdir) is read-only (i.e., for "make distcheck").
 updatepo:
 	cd $(srcdir); \
+	test -w . || exit 0; \
 	for name in $(dist_man_MANS); do \
 		echo $$name; \
 		cp po/$$name.pot po/$$name.new.pot; \
diff --git a/doc/po4a.mk b/doc/po4a.mk
index dd43d9c..a30e752 100644
--- a/doc/po4a.mk
+++ b/doc/po4a.mk
@@ -58,6 +58,7 @@ updatepo:
 	tmpdir=`pwd`; \
 	cd $(srcdir); \
 	for po in *.$(lang).po; do \
+	  case "$$po" in '*'*) continue;; esac; \
 	  pot=../C/po/$${po%$(lang).po}pot; \
 	  echo "$(MSGMERGE) $$po $$pot -o $${po%po}new.po"; \
 	  if $(MSGMERGE) $$po $$pot -o $$tmpdir/$${po%po}new.po; then \
@@ -87,4 +88,3 @@ dist-hook: updatepo
 # Build the pages without addendum
 %: $(srcdir)/%.$(lang).po $(srcdir)/../C/%
 	po4a-translate -f man -m $(srcdir)/../C/$@ -p $< -l $@ $(po4a_translate_options)
-
-- 
1.5.0.rc4.26.gcc46a-dirty




More information about the parted-devel mailing list