summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2007-11-22 08:42:32 +0100
committerJim Meyering <meyering@redhat.com>2007-11-22 08:42:32 +0100
commitfe9033c3091f168e2b0a8625ee34d93073174c35 (patch)
tree32fdec03376840eb0da9353d849ada01f04d7ae1
parent2bdc48121916ab0d7bb7d0cb5cee25549c3705c9 (diff)
downloadcoreutils-fe9033c3091f168e2b0a8625ee34d93073174c35.tar.xz
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.
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.maint9
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b47da4b4..8affb8ebd 100644
--- 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.
diff --git a/Makefile.maint b/Makefile.maint
index 906d7295e..5671f292a 100644
--- a/Makefile.maint
+++ b/Makefile.maint
@@ -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 \