diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/make.tests | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/testsuite/make.tests b/testsuite/make.tests index a12e50b8b..376bdcc15 100755 --- a/testsuite/make.tests +++ b/testsuite/make.tests | |||
@@ -12,18 +12,6 @@ target: | |||
12 | @echo target | 12 | @echo target |
13 | ' | 13 | ' |
14 | 14 | ||
15 | # .DEFAULT rules with no commands or some prerequisites are ignored. | ||
16 | # .DEFAULT rules with commands can be redefined. | ||
17 | testing "make .DEFAULT rule" \ | ||
18 | "make -f - default" "default2\n" "" ' | ||
19 | .DEFAULT: ignored | ||
20 | .DEFAULT: | ||
21 | @echo default1 | ||
22 | .DEFAULT: | ||
23 | @echo default2 | ||
24 | target: | ||
25 | ' | ||
26 | |||
27 | testing "make .DEFAULT rule for prerequisite" \ | 15 | testing "make .DEFAULT rule for prerequisite" \ |
28 | "make -f - 2>/dev/null" "source\n" "" ' | 16 | "make -f - 2>/dev/null" "source\n" "" ' |
29 | .DEFAULT: | 17 | .DEFAULT: |
@@ -721,6 +709,26 @@ target:: file2 file3 file3 | |||
721 | ' | 709 | ' |
722 | cd .. || exit 1; rm -rf make.tempdir 2>/dev/null | 710 | cd .. || exit 1; rm -rf make.tempdir 2>/dev/null |
723 | 711 | ||
712 | # .DEFAULT rules with no commands or some prerequisites are ignored. | ||
713 | # .DEFAULT rules with commands can be redefined. | ||
714 | testing "make: .DEFAULT rule" \ | ||
715 | "make -f - default" "default2\n" "" ' | ||
716 | .DEFAULT: ignored | ||
717 | .DEFAULT: | ||
718 | @echo default1 | ||
719 | .DEFAULT: | ||
720 | @echo default2 | ||
721 | target: | ||
722 | ' | ||
723 | |||
724 | testing "make: double-colon rule" \ | ||
725 | "make -f -" "target1\ntarget2\n" "" ' | ||
726 | target:: | ||
727 | @echo target1 | ||
728 | target:: | ||
729 | @echo target2 | ||
730 | ' | ||
731 | |||
724 | # Double-colon rules didn't work properly if their target was phony: | 732 | # Double-colon rules didn't work properly if their target was phony: |
725 | # - they didn't ignore the presence of a file matching the target name; | 733 | # - they didn't ignore the presence of a file matching the target name; |
726 | # - they were also invoked as if they were a single-colon rule. | 734 | # - they were also invoked as if they were a single-colon rule. |