$NetBSD$

--- Makefile.orig	2021-09-12 00:15:52.000000000 +0000
+++ Makefile
@@ -213,15 +213,19 @@ $(RUSTC_SRC_TARBALL): $(RUSTC_SRC_DES)
 	@echo [CURL] $@
 	@rm -f $@
 	@curl -sS https://static.rust-lang.org/dist/$@ -o $@
-$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
-	tar -xf $(RUSTC_SRC_TARBALL)
+##$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
+$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src.patch
+	@###tar -xf $(RUSTC_SRC_TARBALL)
+	@mv ../$(RUSTCSRC) ./
 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
+	find $(RUSTCSRC) -name '*.[oa]' -print0 | xargs -0 rm
 	cat $(RUSTC_SRC_DES) > $(RUSTC_SRC_DL)
 endif
 
 
 # MRUSTC-specific tests
-.PHONY: local_tests
+.PHONY: local_tests mrustc_tests
+mrustc_tests: test local_tests
 local_tests: $(TEST_DEPS)
 	@$(MAKE) -C tools/testrunner
 	@mkdir -p output$(OUTDIR_SUF)/local_tests
