michael@0: #T commandline: ['-j4'] michael@0: michael@0: # Test that -j1 in a submake has the proper effect. michael@0: michael@0: define SLOWCMD michael@0: printf "$@:0:" >>$(RFILE) michael@0: sleep 0.5 michael@0: printf "$@:1:" >>$(RFILE) michael@0: endef michael@0: michael@0: all: p1 p2 michael@0: subtarget: s1 s2 michael@0: michael@0: p1 p2: RFILE = presult michael@0: s1 s2: RFILE = sresult michael@0: michael@0: p1 s1: michael@0: $(SLOWCMD) michael@0: michael@0: p2 s2: michael@0: sleep 0.1 michael@0: $(SLOWCMD) michael@0: michael@0: all: michael@0: $(MAKE) -j1 -f $(TESTPATH)/parallel-toserial.mk subtarget michael@0: printf "presult: %s\n" "$$(cat presult)" michael@0: test "$$(cat presult)" = "p1:0:p2:0:p1:1:p2:1:" michael@0: printf "sresult: %s\n" "$$(cat sresult)" michael@0: test "$$(cat sresult)" = "s1:0:s1:1:s2:0:s2:1:" michael@0: @echo TEST-PASS michael@0: