From 0e85e599dbcd08e2a0c0e1bfa3cf23ed4eb68197 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 26 Feb 2014 20:13:08 -0800 Subject: [PATCH] mk: Pass the name of the make command to maketest.py This should make BSD use the proper GNU make. --- mk/tests.mk | 1 + src/etc/maketest.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mk/tests.mk b/mk/tests.mk index 4a7a9d65673..c134e71986f 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -904,6 +904,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \ @rm -rf $(3)/test/run-make/$$* @mkdir -p $(3)/test/run-make/$$* $$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \ + $$(MAKE) \ $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \ $(3)/test/run-make/$$* \ "$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \ diff --git a/src/etc/maketest.py b/src/etc/maketest.py index 1e2cdabcb84..9e8bee3abb6 100644 --- a/src/etc/maketest.py +++ b/src/etc/maketest.py @@ -17,12 +17,13 @@ if os.name == 'nt': print 'ignoring make tests on windows' sys.exit(0) -os.putenv('RUSTC', os.path.abspath(sys.argv[2])) -os.putenv('TMPDIR', os.path.abspath(sys.argv[3])) -os.putenv('CC', sys.argv[4]) -os.putenv('RUSTDOC', os.path.abspath(sys.argv[5])) -filt = sys.argv[6] -ldpath = sys.argv[7] +make = sys.argv[2] +os.putenv('RUSTC', os.path.abspath(sys.argv[3])) +os.putenv('TMPDIR', os.path.abspath(sys.argv[4])) +os.putenv('CC', sys.argv[5]) +os.putenv('RUSTDOC', os.path.abspath(sys.argv[6])) +filt = sys.argv[7] +ldpath = sys.argv[8] if ldpath != '': os.putenv(ldpath.split('=')[0], ldpath.split('=')[1]) @@ -30,7 +31,7 @@ if not filt in sys.argv[1]: sys.exit(0) print('maketest: ' + os.path.basename(os.path.dirname(sys.argv[1]))) -proc = subprocess.Popen(['make', '-C', sys.argv[1]], +proc = subprocess.Popen([make, '-C', sys.argv[1]], stdout = subprocess.PIPE, stderr = subprocess.PIPE) out, err = proc.communicate()