Changeset 501 in kBuild for vendor/gnumake/current/tests/scripts/features/statipattrules
- Timestamp:
- Sep 15, 2006 2:30:32 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/gnumake/current/tests/scripts/features/statipattrules
r284 r501 10 10 to emacs a .el file"; 11 11 12 open(MAKEFILE,"> $makefile"); 13 print MAKEFILE <<'EOF'; 12 &touch('bar.c', 'lose.c'); 13 14 # TEST #0 15 # ------- 16 17 run_make_test(' 14 18 files = foo.elc bar.o lose.o 15 19 … … 17 21 18 22 $(filter %.elc,$(files)): %.elc: %.el ; @echo emacs $< 19 EOF 20 close(MAKEFILE); 23 ', 24 '', 25 'CC -c bar.c -o bar.o'); 26 27 # TEST #1 28 # ------- 29 30 run_make_test(undef, 'lose.o', 'CC -c lose.c -o lose.o'); 21 31 22 32 23 &touch('bar.c', 'lose.c'); 24 25 # TEST #1 26 # ------- 27 28 &run_make_with_options($makefile, '', &get_logfile); 29 $answer = "CC -c bar.c -o bar.o\n"; 30 &compare_output($answer, &get_logfile(1)); 31 32 33 # TEST #2 34 # ------- 35 36 &run_make_with_options($makefile, 'lose.o', &get_logfile); 37 $answer = "CC -c lose.c -o lose.o\n"; 38 &compare_output($answer, &get_logfile(1)); 39 40 41 # TEST #3 33 # TEST #2 42 34 # ------- 43 35 &touch("foo.el"); 44 36 45 &run_make_with_options($makefile, 'foo.elc', &get_logfile); 46 $answer = "emacs foo.el\n"; 47 &compare_output($answer, &get_logfile(1)); 37 run_make_test(undef, 'foo.elc', 'emacs foo.el'); 48 38 49 39 # Clean up after the first tests. 50 40 unlink('foo.el', 'bar.c', 'lose.c'); 51 41 52 42 53 # TEST # 4-- PR/1670: don't core dump on invalid static pattern rules43 # TEST #3 -- PR/1670: don't core dump on invalid static pattern rules 54 44 # ------- 55 45 56 $makefile2 = &get_tmpfile; 57 open(MAKEFILE, "> $makefile2"); 58 print MAKEFILE "foo: foo%: % ; \@echo \$@\n"; 59 close(MAKEFILE); 46 run_make_test(' 47 .DEFAULT: ; @echo $@ 48 foo: foo%: % %.x % % % y.% % ; @echo $@ 49 ', 50 '', ".x\ny.\nfoo"); 60 51 61 &run_make_with_options($makefile2, '', &get_logfile);62 $answer = "foo\n";63 &compare_output($answer, &get_logfile(1));64 52 65 # TEST # 5-- bug #12180: core dump on a stat pattern rule with an empty53 # TEST #4 -- bug #12180: core dump on a stat pattern rule with an empty 66 54 # prerequisite list. 67 #68 55 run_make_test(' 69 56 foo.x bar.x: %.x : ; @echo $@ 70 57 71 58 ', 59 '', 'foo.x'); 60 61 62 # TEST #5 -- bug #13881: double colon static pattern rule does not 63 # substitute %. 64 run_make_test(' 65 foo.bar:: %.bar: %.baz 66 foo.baz: ;@: 67 ', 68 '', ''); 69 70 71 # TEST #6: make sure the second stem does not overwrite the first 72 # perprerequisite's stem (Savannah bug #16053). 73 # 74 run_make_test(' 75 all.foo.bar: %.foo.bar: %.one 76 77 all.foo.bar: %.bar: %.two 78 79 all.foo.bar: 80 @echo $* 81 @echo $^ 82 83 .DEFAULT:;@: 84 ', 72 85 '', 73 'foo.x 74 '); 86 'all.foo 87 all.one all.foo.two'); 88 89 90 # TEST #7: make sure the second stem does not overwrite the first 91 # perprerequisite's stem when second expansion is enabled 92 # (Savannah bug #16053). 93 # 94 run_make_test(' 95 .SECONDEXPANSION: 96 97 all.foo.bar: %.foo.bar: %.one $$*-one 98 99 all.foo.bar: %.bar: %.two $$*-two 100 101 all.foo.bar: 102 @echo $* 103 @echo $^ 104 105 .DEFAULT:;@: 106 ', 107 '', 108 'all.foo 109 all.one all-one all.foo.two all.foo-two'); 75 110 76 111 1;
Note:
See TracChangeset
for help on using the changeset viewer.

