rust/mk/clean.mk

54 lines
2.4 KiB
Makefile
Raw Normal View History

2011-05-01 15:18:52 -05:00
######################################################################
# Cleanup
######################################################################
.PHONY: clean
clean:
@$(call E, cleaning)
$(Q)rm -f $(RUNTIME_OBJS) $(RUNTIME_DEF)
$(Q)rm -f $(RUSTLLVM_LIB_OBJS) $(RUSTLLVM_OBJS_OBJS) $(RUSTLLVM_DEF)
$(Q)rm -f $(ML_DEPFILES) $(C_DEPFILES) $(CRATE_DEPFILES)
$(Q)rm -f $(ML_DEPFILES:%.d=%.d.tmp)
$(Q)rm -f $(C_DEPFILES:%.d=%.d.tmp)
$(Q)rm -f $(CRATE_DEPFILES:%.d=%.d.tmp)
$(Q)rm -f $(GENERATED)
2011-07-20 17:55:51 -05:00
$(Q)rm -f stage0/rustc$(X) stage0/lib/glue* stage0/lib/main.o
$(Q)rm -f stage0/lib/$(CFG_RUNTIME) stage0/lib/$(CFG_STDLIB)
$(Q)rm -f stage0/$(CFG_RUNTIME) stage0/$(CFG_STDLIB)
2011-07-21 20:07:10 -05:00
$(Q)rm -f stage0/lib/libstd.rlib
2011-07-20 17:55:51 -05:00
$(Q)rm -f stage0/$(CFG_RUSTLLVM) stage0/lib/intrinsics.bc
$(Q)rm -f stage1/rustc$(X) stage1/lib/glue* stage1/lib/main.o
$(Q)rm -f stage1/lib/$(CFG_RUNTIME) stage1/lib/$(CFG_STDLIB)
$(Q)rm -f stage1/$(CFG_RUNTIME) stage1/$(CFG_STDLIB)
$(Q)rm -f stage1/$(CFG_RUSTLLVM) stage1/lib/intrinsics.bc
2011-07-21 20:07:10 -05:00
$(Q)rm -f stage1/lib/libstd.rlib
2011-07-20 17:55:51 -05:00
$(Q)rm -f stage2/rustc$(X) stage2/lib/glue* stage2/lib/main.o
$(Q)rm -f stage2/lib/$(CFG_RUNTIME) stage2/lib/$(CFG_STDLIB)
$(Q)rm -f stage2/$(CFG_RUNTIME) stage2/$(CFG_STDLIB)
$(Q)rm -f stage2/$(CFG_RUSTLLVM) stage2/lib/intrinsics.bc
2011-07-21 20:07:10 -05:00
$(Q)rm -f stage2/lib/libstd.rlib
2011-07-20 17:55:51 -05:00
$(Q)rm -f stage3/rustc$(X) stage3/lib/glue* stage3/lib/main.o
$(Q)rm -f stage3/lib/$(CFG_RUNTIME) stage3/lib/$(CFG_STDLIB)
$(Q)rm -f stage3/$(CFG_RUNTIME) stage3/$(CFG_STDLIB)
$(Q)rm -f stage3/$(CFG_RUSTLLVM) stage3/lib/intrinsics.bc
2011-07-21 20:07:10 -05:00
$(Q)rm -f stage3/lib/libstd.rlib
2011-07-20 17:55:51 -05:00
$(Q)rm -f stage1/fuzzer stage1/lib/$(CFG_LIBRUSTC)
2011-05-01 15:18:52 -05:00
$(Q)rm -f rustllvm/$(CFG_RUSTLLVM) rustllvm/rustllvmbits.a
$(Q)rm -f rt/$(CFG_RUNTIME)
$(Q)rm -f rt/main.o
2011-07-07 19:22:39 -05:00
$(Q)rm -f rt/main.ll
The Big Test Suite Overhaul This replaces the make-based test runner with a set of Rust-based test runners. I believe that all existing functionality has been preserved. The primary objective is to dogfood the Rust test framework. A few main things happen here: 1) The run-pass/lib-* tests are all moved into src/test/stdtest. This is a standalone test crate intended for all standard library tests. It compiles to build/test/stdtest.stageN. 2) rustc now compiles into yet another build artifact, this one a test runner that runs any tests contained directly in the rustc crate. This allows much more fine-grained unit testing of the compiler. It compiles to build/test/rustctest.stageN. 3) There is a new custom test runner crate at src/test/compiletest that reproduces all the functionality for running the compile-fail, run-fail, run-pass and bench tests while integrating with Rust's test framework. It compiles to build/test/compiletest.stageN. 4) The build rules have been completely changed to use the new test runners, while also being less redundant, following the example of the recent stageN.mk rewrite. It adds two new features to the cfail/rfail/rpass/bench tests: 1) Tests can specify multiple 'error-pattern' directives which must be satisfied in order. 2) Tests can specify a 'compile-flags' directive which will make the test runner provide additional command line arguments to rustc. There are some downsides, the primary being that Rust has to be functioning pretty well just to run _any_ tests, which I imagine will be the source of some frustration when the entire test suite breaks. Will also cause some headaches during porting. Not having individual make rules, each rpass, etc test no longer remembers between runs whether it completed successfully. As a result, it's not possible to incrementally fix multiple tests by just running 'make check', fixing a test, and repeating without re-running all the tests contained in the test runner. Instead you can filter just the tests you want to run by using the TESTNAME environment variable. This also dispenses with the ability to run stage0 tests, but they tended to be broken more often than not anyway.
2011-07-12 21:01:09 -05:00
$(Q)rm -f test/run_pass_stage2.rc test/run_pass_stage2_driver.rs
2011-05-01 15:18:52 -05:00
$(Q)rm -Rf $(PKG_NAME)-*.tar.gz dist
$(Q)rm -f $(foreach ext,o a d bc s exe,$(wildcard stage*/*.$(ext)))
$(Q)rm -Rf $(foreach ext,out out.tmp \
stage0$(X) stage1$(X) stage2$(X) \
bc o s exe dSYM, \
$(wildcard test/*.$(ext) \
test/*/*.$(ext) \
test/bench/*/*.$(ext)))
2011-05-01 15:18:52 -05:00
$(Q)rm -Rf $(foreach ext, \
aux cp fn ky log pdf html pg toc tp vr cps, \
$(wildcard doc/*.$(ext)))
$(Q)rm -Rf doc/version.texi