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.
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.
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 \