From: Ben Pfaff Date: Wed, 6 Apr 2005 18:47:48 +0000 (+0000) Subject: Add SUBMAKEFLAGS. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c38d10fc2f16ee7099afb2e4e3e60a5ac3a2533f;p=pintos-anon Add SUBMAKEFLAGS. Move < from apply-patch to invocations. --- diff --git a/tests/Makefile b/tests/Makefile index ce215b3..456e083 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -13,21 +13,23 @@ check: clean: rm -rf $(TESTS) +SUBMAKEFLAGS = -s + define prep-threads-grading endef define prep-userprog-grading -$(MAKE) -C ../src/userprog -s -$(MAKE) -C ../grading/userprog -s +$(MAKE) -C ../src/userprog $(SUBMAKEFLAGS) +$(MAKE) -C ../grading/userprog $(SUBMAKEFLAGS) endef define prep-vm-grading -$(MAKE) -C ../src/userprog -s -$(MAKE) -C ../grading/vm -s +$(MAKE) -C ../src/userprog $(SUBMAKEFLAGS) +$(MAKE) -C ../grading/vm $(SUBMAKEFLAGS) endef define prep-filesys-grading -$(MAKE) -C ../grading/filesys -s +$(MAKE) -C ../grading/filesys $(SUBMAKEFLAGS) endef define prep-grading @@ -36,6 +38,7 @@ endef define mk-sandbox rm -rf $@ && mkdir -p $@/pintos && cp -R ../src $@/pintos +cd $@/pintos/src && $(MAKE) clean $(SUBMAKEFLAGS) endef define run-tests @@ -47,7 +50,7 @@ rm -rf $@/pintos endef define apply-patch -(cd $@/pintos && patch -p0 -s) < +(cd $@/pintos && patch -p0) endef threads: PROJECT = threads @@ -59,14 +62,14 @@ threads:: p1-1: PROJECT = threads p1-1:: $(mk-sandbox) - $(apply-patch) ../solutions/p1-1.patch + $(apply-patch) < ../solutions/p1-1.patch $(run-tests) -d alarm.* $(clean) p1-2: PROJECT = threads p1-2:: $(mk-sandbox) - $(apply-patch) ../solutions/p1-2.patch + $(apply-patch) < ../solutions/p1-2.patch $(run-tests) -d priority.* $(clean) @@ -74,16 +77,16 @@ list: PROJECT = threads list stdlib stdio:: $(mk-sandbox) cp ../src/tests/threads/$@.c $@/pintos/src/threads/test.c - $(MAKE) -C $@/pintos/src/threads -s + $(MAKE) -C $@/pintos/src/threads $(SUBMAKEFLAGS) -(cd $@/pintos/src/threads/build && pintos -v run -q) | tee $@/output grep -q '$@: PASS' $@/output $(clean) userprog: PROJECT = userprog userprog:: - $(prep-grading) + $(prep-grading) null.dsk $(mk-sandbox) - $(apply-patch) ../solutions/p2-null.patch + $(apply-patch) < ../solutions/p2-null.patch $(run-tests) null $(clean) @@ -91,7 +94,7 @@ p2: PROJECT = userprog p2:: $(prep-grading) $(mk-sandbox) - $(apply-patch) ../solutions/p2.patch + $(apply-patch) < ../solutions/p2.patch $(run-tests) $(clean) @@ -99,12 +102,12 @@ vm: PROJECT = vm vm:: $(prep-grading) $(mk-sandbox) - $(MAKE) -C $@/pintos/src/vm -s + $(MAKE) -C $@/pintos/src/vm $(SUBMAKEFLAGS) $(clean) filesys: PROJECT = filesys filesys:: $(prep-grading) $(mk-sandbox) - $(MAKE) -C $@/pintos/src/filesys -s + $(MAKE) -C $@/pintos/src/filesys $(SUBMAKEFLAGS) $(clean)