5 |
which have either broken at some point in the past or seem likely to |
which have either broken at some point in the past or seem likely to |
6 |
break."; |
break."; |
7 |
|
|
8 |
open(MAKEFILE,"> $makefile"); |
run_make_test(' |
|
print MAKEFILE <<'EOF'; |
|
9 |
# Make sure that subdirectories built as prerequisites are actually handled |
# Make sure that subdirectories built as prerequisites are actually handled |
10 |
# properly. |
# properly. |
11 |
|
|
15 |
|
|
16 |
dir/subdir/file.b: dir/subdir ; @echo touch dir/subdir/file.b |
dir/subdir/file.b: dir/subdir ; @echo touch dir/subdir/file.b |
17 |
|
|
18 |
dir/subdir/%.a: dir/subdir/%.b ; @echo cp $< $@ |
dir/subdir/%.a: dir/subdir/%.b ; @echo cp $< $@', |
19 |
EOF |
'', "mkdir -p dir/subdir\ntouch dir/subdir/file.b\ncp dir/subdir/file.b dir/subdir/file.a\n"); |
|
close(MAKEFILE); |
|
|
|
|
|
&run_make_with_options($makefile,"",&get_logfile); |
|
|
$answer = "mkdir -p dir/subdir\ntouch dir/subdir/file.b\ncp dir/subdir/file.b dir/subdir/file.a\n"; |
|
|
&compare_output($answer,&get_logfile(1)); |
|
20 |
|
|
21 |
# Test implicit rules |
# Test implicit rules |
22 |
|
|
41 |
'done bar'); |
'done bar'); |
42 |
unlink('bar'); |
unlink('bar'); |
43 |
|
|
44 |
|
|
45 |
|
# Test implicit rules with '$' in the name (see se_implicit) |
46 |
|
|
47 |
|
run_make_test(q! |
48 |
|
%.foo : baz$$bar ; @echo 'done $<' |
49 |
|
%.foo : bar$$baz ; @echo 'done $<' |
50 |
|
test.foo: |
51 |
|
fox: baz |
52 |
|
.DEFAULT baz$$bar bar$$baz: ; @echo '$@' |
53 |
|
!, |
54 |
|
'', |
55 |
|
'done bar'); |
56 |
|
|
57 |
1; |
1; |