diff options
author | Boris Kolpackov <boris@kolpackov.net> | 2005-02-27 21:40:23 +0000 |
---|---|---|
committer | Boris Kolpackov <boris@kolpackov.net> | 2005-02-27 21:40:23 +0000 |
commit | 659fc6b55e28740c74d66dbe3bda765d1004a12e (patch) | |
tree | a3b99015012abca13c0f7729274dff1bba322f1f /tests/scripts/misc | |
parent | 9d153cc1b1e467cd6245755c32f78efbd62142c2 (diff) | |
download | gunmake-659fc6b55e28740c74d66dbe3bda765d1004a12e.tar.gz |
Implementation of the second expansion in explicit
rules, static pattern rules and implicit rules.
Diffstat (limited to 'tests/scripts/misc')
-rw-r--r-- | tests/scripts/misc/general4 | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/tests/scripts/misc/general4 b/tests/scripts/misc/general4 index dd77f53..3b4595f 100644 --- a/tests/scripts/misc/general4 +++ b/tests/scripts/misc/general4 @@ -6,9 +6,6 @@ which have either broken at some point in the past or seem likely to break."; open(MAKEFILE,"> $makefile"); - -# The contents of the Makefile ... - print MAKEFILE <<'EOF'; # Make sure that subdirectories built as prerequisites are actually handled # properly. @@ -21,11 +18,36 @@ dir/subdir/file.b: dir/subdir ; @echo touch dir/subdir/file.b dir/subdir/%.a: dir/subdir/%.b ; @echo cp $< $@ EOF - 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)); + +# Test implicit rules + +&touch('foo.c'); +run_make_test(' +foo: foo.o +', + 'CC="@echo cc" OUTPUT_OPTION=', + 'cc -c foo.c +cc foo.o -o foo'); +unlink('foo.c'); + + +# Test other implicit rule searching + +&touch('bar'); +run_make_test(' +test.foo: +%.foo : baz ; @echo done $< +%.foo : bar ; @echo done $< +fox: baz +', + '', + 'done bar'); +unlink('bar'); + 1; |