This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
testclean
- To: libc-hacker@cygnus.com
- Subject: testclean
- From: Philip.Blundell@pobox.com
- Date: Sun, 03 Jan 1999 16:05:37 +0100
At the moment it's awkward to re-run `make check' because Make only tries to
build everything once. This can be infuriating if, say, you realise too late
that you wanted to capture the test output, or you want to run the tests
several times under different kernel versions.
This patch adds a new target, `make testclean', which removes all the test
cases and their output files from the build tree so that `make check' will
perform all the tests anew. Does it look OK?
p.
1999-01-03 Philip Blundell <philb@gnu.org>
* Makefile (tests-clean): New target, removes test cases and
associated output files.
* Makerules (do-tests-clean): New rule to support the above.
* Rules (subdir_testclean): Likewise.
--- clean/libc/Makefile Thu Dec 31 12:45:19 1998
+++ libc/Makefile Fri Jan 1 16:24:51 1999
@@ -57,6 +57,7 @@
subdir_distinfo \
subdir_echo-headers subdir_echo-distinfo \
subdir_install \
+ subdir_testclean \
$(addprefix install-, no-libc.a bin lib data headers others)
headers := errno.h sys/errno.h bits/errno.h limits.h values.h \
@@ -184,7 +185,8 @@
# Targets to clean things up to various degrees.
-.PHONY: clean realclean distclean distclean-1 parent-clean parent-mostlyclean
+.PHONY: clean realclean distclean distclean-1 parent-clean \
+ parent-mostlyclean tests-clean
# Subroutines of all cleaning targets.
parent-mostlyclean: common-mostlyclean # common-mostlyclean is in Makerules.
@@ -206,6 +208,9 @@
mostlyclean: parent-mostlyclean
@$(MAKE) subdir_mostlyclean no_deps=t
-rm -f $(postclean)
+
+tests-clean:
+ @$(MAKE) subdir_testclean no_deps=t
# The realclean target is just like distclean for the parent, but we want
# the subdirs to know the difference in case they care.
--- clean/libc/Makerules Thu Dec 31 12:44:21 1998
+++ libc/Makerules Fri Jan 1 17:02:45 1999
@@ -879,9 +879,16 @@
# Common cleaning targets.
-.PHONY: common-mostlyclean common-clean mostlyclean clean
+.PHONY: common-mostlyclean common-clean mostlyclean clean do-tests-clean
clean: common-clean
mostlyclean: common-mostlyclean
+
+do-tests-clean:
+ -rm -f $(addprefix $(objpfx),$(tests) $(test-srcs) $(tests-static) \
+ $(addsuffix .o,$(tests) $(test-srcs) \
+ $(tests-static)) \
+ $(addsuffix .out,$(tests) $(test-srcs)) \
+ $(addsuffix .sout,$(tests-static)))
# Remove the object files.
common-mostlyclean:
--- clean/libc/Rules Tue Oct 13 21:47:27 1998
+++ libc/Rules Fri Jan 1 17:03:36 1999
@@ -151,11 +151,12 @@
endif # tests
.PHONY: distclean realclean subdir_distclean subdir_realclean \
- subdir_clean subdir_mostlyclean
+ subdir_clean subdir_mostlyclean subdir_testclean
subdir_mostlyclean: mostlyclean
subdir_clean: clean
subdir_distclean: distclean
subdir_realclean: realclean
+subdir_testclean: do-tests-clean
realclean: distclean
distclean: clean
- Follow-Ups:
- Re: testclean
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>