summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-10-18 12:55:04 +0200
committerJim Meyering <meyering@redhat.com>2008-10-18 12:55:04 +0200
commit74443830ea0a683e5373a8c8beee1a657170c89c (patch)
tree15448e47890fa0b4c7bf9c7d75434c04dcb98117
parent2ae61facc71b46f3ea970fe497da62ab3b55b878 (diff)
downloadcoreutils-74443830ea0a683e5373a8c8beee1a657170c89c.tar.xz
* maint.mk (coreutils-path-check): New definition, now run
only if src/true.c exists. Factored out of... (my-distcheck): ...here.
-rw-r--r--maint.mk45
1 files changed, 29 insertions, 16 deletions
diff --git a/maint.mk b/maint.mk
index 27524860d..a7d0b860b 100644
--- a/maint.mk
+++ b/maint.mk
@@ -785,6 +785,34 @@ define my-instcheck
}
endef
+define coreutils-path-check
+ { \
+ if test -f $(srcdir)/src/true.c; then \
+ fail=1; \
+ 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);; \
+ cat|dirname|mv|wc);; \
+ *) ln $(bin)/loser $(bin)/$$i;; \
+ esac; \
+ done \
+ && ln -sf ../src/true $(bin)/false \
+ && PATH=`pwd`/$(bin):$$PATH $(MAKE) -C tests check \
+ && { test -d gnulib-tests \
+ && $(MAKE) -C gnulib-tests check \
+ || :; } \
+ && rm -rf $(bin) \
+ && fail=0; \
+ else \
+ fail=0; \
+ fi; \
+ test $$fail = 1 && exit 1 || :; \
+ }
+endef
+
# 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.
@@ -810,22 +838,7 @@ my-distcheck: $(DIST_ARCHIVES) $(local-check)
&& $(MAKE) dvi \
&& $(install-transform-check) \
&& $(my-instcheck) \
- && 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);; \
- cat|dirname|mv|wc);; \
- *) ln $(bin)/loser $(bin)/$$i;; \
- esac; \
- done \
- && ln -sf ../src/true $(bin)/false \
- && PATH=`pwd`/$(bin):$$PATH $(MAKE) -C tests check \
- && { test -d gnulib-tests \
- && $(MAKE) -C gnulib-tests check \
- || :; } \
- && rm -rf $(bin) \
+ && $(coreutils-path-check) \
&& $(MAKE) distclean
(cd $(t) && mv $(distdir) $(distdir).old \
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz