]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Make it easier to diagnose PATH-induced "make distcheck" failures.
authorJim Meyering <meyering@redhat.com>
Thu, 22 Nov 2007 07:42:32 +0000 (08:42 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 22 Nov 2007 07:42:32 +0000 (08:42 +0100)
* Makefile.maint (write_loser): Define.
(my-distcheck): Use an always-failing wrapper script, that gives
a diagnostic, not "false".
Run only "make -C tests check" with the restrictive PATH.
Run the new gnulib-tests/ with the usual PATH.

ChangeLog
Makefile.maint

index 2b47da4b4aa3fb0505ec090cf32a4081d55c1cec..8affb8ebdb1619de10b43530ab56c0f143124811 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2007-11-22  Jim Meyering  <meyering@redhat.com>
 
+       Make it easier to diagnose PATH-induced "make distcheck" failures.
+       * Makefile.maint (write_loser): Define.
+       (my-distcheck): Use an always-failing wrapper script, that gives
+       a diagnostic, not "false".
+       Run only "make -C tests check" with the restrictive PATH.
+       Run the new gnulib-tests/ with the usual PATH.
+
        cp: by default, refuse to copy through a dangling destination symlink
        * NEWS: Mention this change.
        * doc/coreutils.texi (cp invocation): Describe the new behavior.
index 906d7295ef0df36ae645f50f62c8f8672a2c99a6..5671f292a1aa191f61c09d0561a4dcbd7cc97974 100644 (file)
@@ -567,6 +567,8 @@ built_programs = $$(cd src && MAKEFLAGS= $(MAKE) -s built_programs.list)
 warn_cflags = -Dlint -O -Werror -Wall -Wformat -Wshadow -Wpointer-arith
 bin=bin-$$$$
 
+write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
+
 # Use -Wformat -Werror to detect format-string/arg-list mismatches.
 # Also, check for shadowing problems with -Wshadow, and for pointer
 # arithmetic problems with -Wpointer-arith.
@@ -591,15 +593,18 @@ my-distcheck: $(local-check) $(release_archive_dir)/$(prev-tgz)
              AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)'       \
          && $(MAKE) dvi                                \
          && mkdir $(bin)                               \
+         && ($(write_loser)) > $(bin)/loser            \
+         && chmod a+x $(bin)/loser                     \
          && for i in $(built_programs); do             \
               case $$i in                              \
                 rm|expr|basename|echo|sort|ls|tr);;    \
                 mv|dirname);;                          \
-                *) ln -s ../src/false $(bin)/$$i;;     \
+                *) ln $(bin)/loser $(bin)/$$i;;        \
               esac;                                    \
             done                                       \
          && ln -sf ../src/true $(bin)/false            \
-         && PATH=`pwd`/$(bin):$$PATH $(MAKE) check     \
+         && PATH=`pwd`/$(bin):$$PATH $(MAKE) -C tests check \
+         && $(MAKE) -C gnulib-tests check              \
          && rm -rf $(bin)                              \
          && $(MAKE) distclean
        (cd $(t) && mv $(distdir) $(distdir).old        \