bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint.mk: adjust a release-related rule not to require use of gz


From: Jim Meyering
Subject: [PATCH] maint.mk: adjust a release-related rule not to require use of gzip
Date: Sat, 01 Oct 2011 17:35:55 +0200

In preparing to stop building gzip-compressed tarballs in a few
projects I maintain, this change comes in handy:

>From 244794a7887f13d9cdb91fed96932cc479905b96 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 1 Oct 2011 17:33:42 +0200
Subject: [PATCH] maint.mk: adjust a release-related rule not to require use
 of gzip

* top/maint.mk (writable-files): Don't hard-code use of .tar.gz.
Instead, check each file in $(DIST_ARCHIVES).  This is better for
projects that build only .tar.xz files.  Also fix an erroneous test.
---
 ChangeLog    |    5 +++++
 top/maint.mk |   18 +++++++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7ad4703..a6d363a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-10-01  Jim Meyering  <address@hidden>

+       maint.mk: adjust a release-related rule not to require use of gzip
+       * top/maint.mk (writable-files): Don't hard-code use of .tar.gz.
+       Instead, check each file in $(DIST_ARCHIVES).  This is better for
+       projects that build only .tar.xz files.  Also fix an erroneous test.
+
        test-linkat: don't leave behind a temporary file
        * tests/test-linkat.c (main): Don't forget to remove a temporary file.
        Otherwise, coreutils' "make distcheck" would fail with this:
diff --git a/top/maint.mk b/top/maint.mk
index 0137df1..51f617b 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1079,16 +1079,20 @@ sc_makefile_path_separator_check:
        halt=$(msg)                                                     \
          $(_sc_search_regexp)

-# Check that `make alpha' will not fail at the end of the process.
+# Check that `make alpha' will not fail at the end of the process,
+# i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
+# and is read-only.
 writable-files:
-       if test -d $(release_archive_dir); then :; else                 \
-         for file in $(distdir).tar.gz                                 \
-                     $(release_archive_dir)/$(distdir).tar.gz; do      \
-           test -e $$file || continue;                                 \
-           test -w $$file                                              \
-             || { echo ERROR: $$file is not writable; fail=1; };       \
+       if test -d $(release_archive_dir); then                         \
+         for file in $(DIST_ARCHIVES); do                              \
+           for p in ./ $(release_archive_dir)/; do                     \
+             test -e $$p$$file || continue;                            \
+             test -w $$p$$file                                         \
+               || { echo ERROR: $$p$$file is not writable; fail=1; };  \
+           done;                                                       \
          done;                                                         \
          test "$$fail" && exit 1 || : ;                                \
+       else :;                                                         \
        fi

 v_etc_file = $(gnulib_dir)/lib/version-etc.c
--
1.7.7.rc0.362.g5a14



reply via email to

[Prev in Thread] Current Thread [Next in Thread]