!,
'', "#MAKE#: Nothing to be done for 'all'.\n");
+# subtest 3
+# hello.x is explicitly mentioned on an unrelated rule and thus is not an
+# intermediate file.
+# Terminal pattern rules do not apply anyway and there is no rule to built
+# 'hello.x'.
+touch('hello.z');
+run_make_test(q!
+all: hello.z
+%.z:: %.x; touch $@
+%.x: ;
+unrelated: hello.x
+!,
+ '', "#MAKE#: *** No rule to make target 'hello.x', needed by 'hello.z'. Stop.\n", 512);
+
unlink('hello.z');
%.x: ;
!, '', "hello.z hello.q\n");
+# subtest 3
+# hello.x is explicitly mentioned on an unrelated rule and thus is not an
+# intermediate file.
+run_make_test(q!
+all: hello.z
+%.z %.q: %.x; @echo $*.z $*.q
+%.x: ;
+unrelated: hello.x
+!, '', "hello.z hello.q\n");
+
unlink('hello.z');
unlink('hello.q');
}
}
+# Test that prerequisite 'hello.x' mentioned explicitly on an unrelated rule is
+# not considered intermediate.
+touch('hello.tsk');
+unlink('hello.x');
+run_make_test("
+all: hello.tsk
+%.tsk: %.x; touch hello.tsk
+%.x: ;
+unrelated: hello.x
+", '', "touch hello.tsk\n");
+unlink('hello.tsk');
+
touch ('hello.f');
# Test implicit search of builtin rules.
!,
'', "touch hello.z");
+# subtest 3
+# hello.x is explicitly mentioned on an unrelated rule and thus is not an
+# intermediate file.
+touch('hello.z');
+run_make_test(q!
+all: hello.z
+%.z: %.x; touch $@
+%.x: ;
+unrelated: hello.x
+!,
+ '', "touch hello.z");
+
unlink('hello.z');
# sv 60188.
%.x: ;
!, '', "hello.z\n");
+# subtest 3.
+# hello.x is explicitly mentioned on an unrelated rule and thus is not an
+# intermediate file.
+run_make_test(q!
+.SECONDEXPANSION:
+dep:=hello.x
+all: hello.z
+%.z: %.x; @echo $@
+%.x: ;
+unrelated: $$(dep)
+!, '', "hello.z\n");
+
unlink('hello.z');
# subtest 2
run_make_test(q!
-hello.z: %.z: test.x ; @echo $@
+hello.z: %.z: %.x test.x ; @echo $@
%.x: ;
!, '', "hello.z\n");
+# subtest 3
+# 'hello.x' is mentioned explicitly on an unrelated rule.
+run_make_test(q!
+hello.z: %.z: %.x ; @echo $@
+%.x: ;
+unrelated: hello.x
+!, '', "hello.z\n");
+
+
unlink('hello.z');
1;