From 6c9a393f954805d49ab6c66957b46199ddd6e78e Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 9 Jul 2002 06:35:56 +0000 Subject: Documentation and tests for order-only prerequisites. Add a new test suite for automatic variables. --- tests/scripts/variables/automatic | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/scripts/variables/automatic (limited to 'tests/scripts/variables/automatic') diff --git a/tests/scripts/variables/automatic b/tests/scripts/variables/automatic new file mode 100644 index 0000000..b80d478 --- /dev/null +++ b/tests/scripts/variables/automatic @@ -0,0 +1,50 @@ +# -*-perl-*- + +$description = "Test automatic variable setting."; + +$details = ""; + +use Cwd; + +$dir = cwd; +$dir =~ s,.*/([^/]+)$,../$1,; + +open(MAKEFILE, "> $makefile"); +print MAKEFILE "dir = $dir\n"; +print MAKEFILE <<'EOF'; +.SUFFIXES: +.SUFFIXES: .x .y .z +$(dir)/foo.x : baz.z $(dir)/bar.y baz.z + @echo '$$@ = $@, $$(@D) = $(@D), $$(@F) = $(@F)' + @echo '$$* = $*, $$(*D) = $(*D), $$(*F) = $(*F)' + @echo '$$< = $<, $$(