summaryrefslogtreecommitdiff
path: root/tests/scripts/misc/general4
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2005-12-11 15:41:17 +0000
committerPaul Smith <psmith@gnu.org>2005-12-11 15:41:17 +0000
commit3bcb608bdab1d3d24251548aac8bc33fc2fdad66 (patch)
tree9f5d9e31c96991d14c9774976873c32d2b467a72 /tests/scripts/misc/general4
parent0e6c4f5b0ed4183bbdb8cdce168dcbd1bc9cf182 (diff)
downloadgunmake-3bcb608bdab1d3d24251548aac8bc33fc2fdad66.tar.gz
Extend .SECONDEXPANSION to implicit rules. Final fix for bug #13781.
Diffstat (limited to 'tests/scripts/misc/general4')
-rw-r--r--tests/scripts/misc/general427
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/scripts/misc/general4 b/tests/scripts/misc/general4
index bce4a30..ccccf88 100644
--- a/tests/scripts/misc/general4
+++ b/tests/scripts/misc/general4
@@ -53,4 +53,31 @@ baz$$bar bar$$baz: ; @echo '$@'
'',
"baz\$bar\ndone baz\$bar");
+
+# Test implicit rules with '$' in the name (see se_implicit)
+# Use the '$' in the pattern.
+
+run_make_test(q!
+%.foo : %$$bar ; @echo 'done $<'
+test.foo:
+test$$bar: ; @echo '$@'
+!,
+ '',
+ "test\$bar\ndone test\$bar");
+
+# Make sure that subdirectories built as prerequisites are actually handled
+# properly... this time with '$'
+
+run_make_test(q!
+
+all: dir/subdir/file.$$a
+
+dir/subdir: ; @echo mkdir -p '$@'
+
+dir/subdir/file.$$b: dir/subdir ; @echo touch '$@'
+
+dir/subdir/%.$$a: dir/subdir/%.$$b ; @echo 'cp $< $@'
+!,
+ '', "mkdir -p dir/subdir\ntouch dir/subdir/file.\$b\ncp dir/subdir/file.\$b dir/subdir/file.\$a\n");
+
1;