summaryrefslogtreecommitdiff
path: root/tests/scripts/misc/general4
diff options
context:
space:
mode:
authorbosk <>2005-02-27 21:40:23 +0000
committerbosk <>2005-02-27 21:40:23 +0000
commitf5e5f2f3ee02d89d31a78310e1d58ced5d59fd74 (patch)
treeb37c05b50e1276ee9da14ce440280e5a029e80e7 /tests/scripts/misc/general4
parent229de169c251cc346c57c42af78e6ef112adc9b9 (diff)
downloadmake-f5e5f2f3ee02d89d31a78310e1d58ced5d59fd74.tar.gz
Implementation of the second expansion in explicit
rules, static pattern rules and implicit rules.
Diffstat (limited to 'tests/scripts/misc/general4')
-rw-r--r--tests/scripts/misc/general430
1 files changed, 26 insertions, 4 deletions
diff --git a/tests/scripts/misc/general4 b/tests/scripts/misc/general4
index dd77f539..3b4595f1 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;