summaryrefslogtreecommitdiffstats
path: root/tests/variable
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearKaren Arutyunov2019-01-1610-10/+10
|
* Add support for target and prerequisite specific variable blocksBoris Kolpackov2018-11-215-3/+150
| | | | | | | | | | | | | | | | | | | | | | | | For example, now instead of: lib{foo}: cxx.loptions += -static lib{foo}: cxx.libs += -lpthread We can write: lib{foo}: { cxx.loptions += -static cxx.libs += -lpthread } The same works for prerequisites as well as target type/patterns. For example: exe{*.test}: { test = true install = false }
* Implement support for dependency chainsBoris Kolpackov2018-11-161-4/+9
| | | | | | | | | | | | | | | | | | | | Now instead of: ./: exe{foo} exe{foo}: cxx{*} We can write: ./: exe{foo}: cxx{*} Or even: ./: exe{foo}: libue{foo}: cxx{*} This can be combined with prerequisite-specific variables (which naturally only apply to the last set of prerequisites in the chain): ./: exe{foo}: libue{foo}: bin.whole = false
* Rename .test/test{} to .testscript/testscript{}Boris Kolpackov2018-09-044-4/+4
|
* Remove target/scope irregularity workaroundsBoris Kolpackov2018-05-241-2/+1
|
* Update copyright yearKaren Arutyunov2018-05-198-8/+8
|
* Get rid of doc{version} and types for testscript and manifest in buildfilesKaren Arutyunov2018-05-194-4/+4
|
* Regularize directory target/scope-specific variable assignment syntaxBoris Kolpackov2018-05-035-3/+128
|
* Redo string/stream representation of dir{} name/targetBoris Kolpackov2017-12-161-8/+8
| | | | | | | | | | | | | | Now instead of: dir{foo/bar/} We get: foo/dir{bar/} Which feels more consistent with how we print other names/targets. That is, "directory bar/ in directory foo/" similar how foo/exe{bar} is "executable bar in directory foo/".
* Add test for prerequisite-specific variablesBoris Kolpackov2017-11-202-0/+76
|
* Implement implied buildfile supportBoris Kolpackov2017-03-141-5/+0
| | | | | | | | In essence, if the buildfile is: ./: */ Then it can be omitted entirely (provided there is at least one subdirectory).
* Use variable_cache for target type/pattern-specific prepend/appendBoris Kolpackov2017-02-133-0/+88
|
* Move old tests to old-tests/Boris Kolpackov2016-12-0135-918/+0
|
* Allow implicit (lexical) typed-to-typed conversionBoris Kolpackov2016-12-011-3/+3
|
* Implement value type propagation on expansionBoris Kolpackov2016-11-231-3/+3
| | | | | | Currently, we only propagate types of sole, unquoted expansions (variable, function call, or eval context), similar to NULL. To untypify the value, simply quote it.
* When assigning always ignore existing value typeBoris Kolpackov2016-11-042-0/+5
| | | | | | | For example: x = [uint64] 1 x = a # Ok.
* Add support for using '*' as target type in variable assignmentBoris Kolpackov2016-08-301-0/+6
| | | | | | | | So these three are equivalent: *: foo = 1 {*}: foo = 2 *{*}: foo = 3
* Adjust to new path implementation, use to support reversibilityBoris Kolpackov2016-07-285-0/+77
|
* Change default var override from 'projects and subprojects' to amalgamationBoris Kolpackov2016-07-222-0/+11
| | | | | | | | | | | The 'projects and subprojects' semantics resulted in some counter-intuitive behavior. For example, in a project with tests/ as a subproject if one builds one of the tests directly with a non-global override (say C++ compiler), then the main project would be built without the overrides. I this light, overriding in the whole amalgamation seems like the right thing to do. The old behavior can still be obtained with scope qualification, for example: b ./:foo=bar
* Add support for prepend/append in target type/pattern-specific varsBoris Kolpackov2016-07-163-0/+69
| | | | | | | | | | | | | | | | | Semantically, these are similar to variable overrides and are essentially treated as "templates" that are applied on lookup to the "stem" value that is specific to the target type/name. For example: x = [string] a file{f*}: x =+ b sub/: { file{*}: x += c print $(file{foo}:x) # abc print $(file{bar}:x) # ac }
* Port to MinGWKaren Arutyunov2016-06-186-9/+31
|
* Fix legacy stuff in testsBoris Kolpackov2016-04-211-1/+0
|
* Add support for using value attributes in eval contextBoris Kolpackov2016-04-182-3/+3
| | | | | | | | | | For example: if ($x == [null]) Or: if ([uint64] 01 == [uint64] 1)
* Add support for scope-qualification of overrides, scope visibilityBoris Kolpackov2016-04-121-2/+42
|
* Test and fix override logicBoris Kolpackov2016-04-067-0/+366
|
* Add support for scope/target-qualified variable expansionBoris Kolpackov2016-04-053-0/+42
| | | | | | | | | | For example: print $(dir/:var) print $(file{target}:var) print $(dir/file{target}:var) Note that if the scope/target does not (yet) exists, it will be created.
* Implement value typing, null support via value attributesBoris Kolpackov2016-04-045-4/+104
| | | | | | | | For example: v = [null] v = [string] abc v += ABC # abcABC
* Implement variable typing (via attributes)Boris Kolpackov2016-04-023-0/+26
| | | | | | Now we can do: [string] str = foo
* Set part of variable override implementationBoris Kolpackov2016-03-312-2/+2
|
* Add support for pair representation reversibilityBoris Kolpackov2016-03-282-0/+16
|
* Add support for variable prepend operator: =+Boris Kolpackov2015-12-143-0/+21
|
* Implement target type/pattern-specific variablesBoris Kolpackov2015-11-301-0/+33
| | | | | | | | | | | | | | | | For example: cxx{*-options}: dist = true 1. Only single '*' wildcard is supported, matches 0 or more characters. 2. If target type is not specified, it defaults to any target. 3. Appending (+=) is not allowed. 4. The value is expanded immediately in the context of the scope. 5. The more specific pattern (i.e., with the shortest "stem") is preferred. If the stem has the same length, then the last defined (but not redefined) pattern is used. This will probably have to change to become an error. See tests/variable/type-pattern for more examples.
* Add support for evaluation contextBoris Kolpackov2015-09-093-0/+35
| | | | | | | | | | | | | | | | | | | | For now it acts as just the value mode that can be enabled anywhere variable expansion is supported, for example: (foo=bar): And the primary use currently is to enable/test quoted and indirect variable expansion: "foo bar" = FOO BAR print $"foo bar" # Invalid. print $("foo bar") # Yeah, baby. foo = FOO FOO = foo print $($foo) Not that you should do something like this...
* Only treat name as directory if it is reversibleBoris Kolpackov2015-08-242-0/+12
|
* Add support for reversing project qualification to string valueBoris Kolpackov2015-08-244-0/+38