From 57c4e39dcb8eb6013e22cfe82597111c5c6a55af Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 26 Feb 2018 09:53:46 +0200 Subject: Regularize directory target/scope-specific variable assignment syntax --- old-tests/amalgam/libtest/build/export.build | 2 +- old-tests/attribute/buildfile | 4 ++-- old-tests/cli/lib/libtest/build/export.build | 2 +- old-tests/cli/lib/libtest/test/buildfile | 2 +- old-tests/install/lib/libtest/build/export.build | 2 +- old-tests/install/lib/libtest/build/root.build | 2 +- old-tests/postponed/buildfile | 2 +- .../scope/amalgamation/l1/build/bootstrap.build | 2 +- old-tests/scope/amalgamation/l1/buildfile | 8 +++---- old-tests/semantics/include/includer | 5 ++-- old-tests/semantics/source/sourcer | 4 ++-- old-tests/test.sh | 1 - old-tests/variable/override/buildfile | 2 +- old-tests/variable/override/p/buildfile | 2 +- old-tests/variable/qualified/buildfile | 27 ---------------------- old-tests/variable/qualified/test.out | 12 ---------- old-tests/variable/qualified/test.sh | 3 --- old-tests/variable/type-pattern-append/buildfile | 4 ++-- old-tests/variable/type/buildfile | 4 ++-- 19 files changed, 24 insertions(+), 66 deletions(-) delete mode 100644 old-tests/variable/qualified/buildfile delete mode 100644 old-tests/variable/qualified/test.out delete mode 100755 old-tests/variable/qualified/test.sh (limited to 'old-tests') diff --git a/old-tests/amalgam/libtest/build/export.build b/old-tests/amalgam/libtest/build/export.build index b95e409..c1c6a8b 100644 --- a/old-tests/amalgam/libtest/build/export.build +++ b/old-tests/amalgam/libtest/build/export.build @@ -1,4 +1,4 @@ -$out_root/: +$out_root/ { include buildfile } diff --git a/old-tests/attribute/buildfile b/old-tests/attribute/buildfile index 6675894..7338641 100644 --- a/old-tests/attribute/buildfile +++ b/old-tests/attribute/buildfile @@ -6,10 +6,10 @@ #[foo=dir/file{bar}] # error: invalid attribute key #[foo] print hello # error: attributes before print -#[foo]./: # error: attributes before directory scope +#[foo]./ # error: attributes before directory scope #{ #} -#[foo]./: # error: attributes before target/scope +#[foo]./: # error: attributes before target scope #./: [foo] buildfile # error: attributes before prerequisites #import [foo] libz # error: attributes without variable diff --git a/old-tests/cli/lib/libtest/build/export.build b/old-tests/cli/lib/libtest/build/export.build index e8b12b3..f5e50c7 100644 --- a/old-tests/cli/lib/libtest/build/export.build +++ b/old-tests/cli/lib/libtest/build/export.build @@ -1,4 +1,4 @@ -$out_root/: +$out_root/ { include test/ } diff --git a/old-tests/cli/lib/libtest/test/buildfile b/old-tests/cli/lib/libtest/test/buildfile index a7667e6..4cf5ebe 100644 --- a/old-tests/cli/lib/libtest/test/buildfile +++ b/old-tests/cli/lib/libtest/test/buildfile @@ -6,7 +6,7 @@ cli.cxx{base}: cli{base} cli.options += -I $src_root --include-with-brackets -extra/: +extra/ { cxx{test} hxx{test}: cli{test} cli.options += --include-prefix test/extra --guard-prefix TEST_EXTRA \ diff --git a/old-tests/install/lib/libtest/build/export.build b/old-tests/install/lib/libtest/build/export.build index e8b12b3..f5e50c7 100644 --- a/old-tests/install/lib/libtest/build/export.build +++ b/old-tests/install/lib/libtest/build/export.build @@ -1,4 +1,4 @@ -$out_root/: +$out_root/ { include test/ } diff --git a/old-tests/install/lib/libtest/build/root.build b/old-tests/install/lib/libtest/build/root.build index 20536a2..9cf16a1 100644 --- a/old-tests/install/lib/libtest/build/root.build +++ b/old-tests/install/lib/libtest/build/root.build @@ -4,7 +4,7 @@ hxx{*}: extension = hxx ixx{*}: extension = ixx cxx{*}: extension = cxx -tests/: +tests/ { exe{*}: test = true install = false diff --git a/old-tests/postponed/buildfile b/old-tests/postponed/buildfile index 53873aa..437d85f 100644 --- a/old-tests/postponed/buildfile +++ b/old-tests/postponed/buildfile @@ -2,4 +2,4 @@ using cxx exe{driver}: cxx{driver} fsdir{$out_root/out} -./: exe{driver} +./: exe{driver} diff --git a/old-tests/scope/amalgamation/l1/build/bootstrap.build b/old-tests/scope/amalgamation/l1/build/bootstrap.build index 6bde838..81499d4 100644 --- a/old-tests/scope/amalgamation/l1/build/bootstrap.build +++ b/old-tests/scope/amalgamation/l1/build/bootstrap.build @@ -8,7 +8,7 @@ using config # If they are the same, then this scope will simply # be "upgraded". # -$src_root/../: +$src_root/../ { print 0: $project print 0: $src_base diff --git a/old-tests/scope/amalgamation/l1/buildfile b/old-tests/scope/amalgamation/l1/buildfile index 55d8c64..c6d3506 100644 --- a/old-tests/scope/amalgamation/l1/buildfile +++ b/old-tests/scope/amalgamation/l1/buildfile @@ -1,6 +1,6 @@ # Out of amalgamation. # -../../: +../../ { print -1: $project print -1: $src_base @@ -9,7 +9,7 @@ # In amalgamation. # -../s/: +../s/ { print 0: $project print 0: $src_base @@ -18,7 +18,7 @@ # In project. # -s/: +s/ { print 1: $project print 1: $src_base @@ -27,7 +27,7 @@ s/: # In sub-project. # -l2/s/: +l2/s/ { print 2: $project print 2: $src_base diff --git a/old-tests/semantics/include/includer b/old-tests/semantics/include/includer index 70527a5..700076e 100644 --- a/old-tests/semantics/include/includer +++ b/old-tests/semantics/include/includer @@ -2,9 +2,10 @@ include include includee1 include includee1 ../include/includee2 # includee1 is skipped include nested/includee3 -nested/: +nested/ { include includee5 include ../includee2 # skipped } -: + +./: diff --git a/old-tests/semantics/source/sourcer b/old-tests/semantics/source/sourcer index eb1310e..030e9bc 100644 --- a/old-tests/semantics/source/sourcer +++ b/old-tests/semantics/source/sourcer @@ -1,9 +1,9 @@ source source sourcee1 source sourcee1 ../source/sourcee2 -nested/: +nested/ { source sourcee3 source ../sourcee1 } -: +./: diff --git a/old-tests/test.sh b/old-tests/test.sh index f02291a..96a7ed3 100755 --- a/old-tests/test.sh +++ b/old-tests/test.sh @@ -24,6 +24,5 @@ test "variable/expansion" test "variable/null" test "variable/override" test "variable/prepend" -test "variable/qualified" test "variable/type" test "variable/type-pattern-append" diff --git a/old-tests/variable/override/buildfile b/old-tests/variable/override/buildfile index c090e81..2889f69 100644 --- a/old-tests/variable/override/buildfile +++ b/old-tests/variable/override/buildfile @@ -20,7 +20,7 @@ elif ($a == pr) print ". :" $v -d/: +d/ { if ($d_a == as) { diff --git a/old-tests/variable/override/p/buildfile b/old-tests/variable/override/p/buildfile index 527b9ae..5b84925 100644 --- a/old-tests/variable/override/p/buildfile +++ b/old-tests/variable/override/p/buildfile @@ -13,7 +13,7 @@ elif ($p_a == pr) print "p :" $v -d/: +d/ { if ($p_d_a == as) { diff --git a/old-tests/variable/qualified/buildfile b/old-tests/variable/qualified/buildfile deleted file mode 100644 index 870b808..0000000 --- a/old-tests/variable/qualified/buildfile +++ /dev/null @@ -1,27 +0,0 @@ -#v = (foo:) # error: variable name expected before ':' -#v = (:bar) # error: scope/target expected after ':' - -print (foo:bar) -print (foo :bar) -print (foo: bar) -print (foo : bar) -print (foo/: bar) -print (foo/file{fox}: bar) - -bar=bar -sub/: -{ - bar=Bar - fsdir{./}: bar=BAR - file{x}: bar=BBAARR -} - -print $(./:bar) -print $(sub/:bar) -print $(fsdir{sub/}:bar) -print $(sub/file{x}:bar) - -print $(sub/file{y}:bar) -print $(sup/:bar) - -./: diff --git a/old-tests/variable/qualified/test.out b/old-tests/variable/qualified/test.out deleted file mode 100644 index 5bf062e..0000000 --- a/old-tests/variable/qualified/test.out +++ /dev/null @@ -1,12 +0,0 @@ -foo:bar -foo:bar -foo:bar -foo:bar -foo/:bar -foo/file{fox}:bar -bar -Bar -BAR -BBAARR -Bar -bar diff --git a/old-tests/variable/qualified/test.sh b/old-tests/variable/qualified/test.sh deleted file mode 100755 index c745b76..0000000 --- a/old-tests/variable/qualified/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -b -q | diff --strip-trailing-cr -u test.out - diff --git a/old-tests/variable/type-pattern-append/buildfile b/old-tests/variable/type-pattern-append/buildfile index a91b340..348f70f 100644 --- a/old-tests/variable/type-pattern-append/buildfile +++ b/old-tests/variable/type-pattern-append/buildfile @@ -41,7 +41,7 @@ x = $(dir{./}:x5) print $(dir{./}:x5) x6 = [string] a -sub/: +sub/ { dir{*}: x6 += b dir{*}: x6 += [null] @@ -50,7 +50,7 @@ sub/: x7 = [string] b dir{*}: x7 =+ a -sub/: +sub/ { dir{*}: x7 += c print $(dir{./}:x7) diff --git a/old-tests/variable/type/buildfile b/old-tests/variable/type/buildfile index a22cddd..ef56f19 100644 --- a/old-tests/variable/type/buildfile +++ b/old-tests/variable/type/buildfile @@ -54,14 +54,14 @@ v4b =+ [uint64] 01 print $v4b # 2 v5a = 01 -sub/: +sub/ { v5a += [uint64] 01 print $v5a # 2 } v5b = 01 -sub/: +sub/ { v5b =+ [uint64] 01 print $v5b # 2 -- cgit v1.1