summaryrefslogtreecommitdiffstats
path: root/build2/variable.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearKaren Arutyunov2019-01-161-1/+1
|
* Use butl::path_match() for pattern-specific variable matchingBoris Kolpackov2018-08-271-25/+10
|
* Make project variable to be of project_name typeKaren Arutyunov2018-07-301-2/+51
|
* Add prerequisite variable visibility specification/enforcementBoris Kolpackov2018-06-281-0/+19
|
* Add $process.run() and $process.run_regex() functionsBoris Kolpackov2018-06-201-1/+33
| | | | | | | | | | | | | | $process.run(<prog>[ <args>...]) Return trimmed stdout. $process.run_regex(<prog>[ <args>...], <pat> [, <fmt>]) Return stdout lines matched and optionally processed with regex. Each line of stdout (including the customary trailing blank) is matched (as a whole) against <pat> and, if successful, returned, optionally processed with <fmt>, as an element of a list.
* Update copyright yearKaren Arutyunov2018-05-191-1/+1
|
* Get rid of action rule override semanticsBoris Kolpackov2018-02-031-4/+11
| | | | | Instead we now have two more or less separate match states for outer and inner parts of an action.
* Add support for variable aliasesBoris Kolpackov2018-01-051-26/+81
|
* Implement info meta operationBoris Kolpackov2017-12-131-0/+4
| | | | | This meta operation can be used to print basic information (name, version, source/output roots, etc) for one or more projects.
* Add support for first-access value typification during non-load phasesBoris Kolpackov2017-12-051-25/+24
|
* Minor value typification API changeBoris Kolpackov2017-12-051-1/+1
|
* Uninline variable_map::typify()Boris Kolpackov2017-12-041-1/+1
|
* Add cast_empty() for value castingBoris Kolpackov2017-12-041-0/+6
|
* Add few clarifying commentsBoris Kolpackov2017-12-031-1/+1
|
* Allow typification of variables and values across load generationsBoris Kolpackov2017-12-031-23/+3
| | | | | | | | | | The original semantics turned out to be too restrictive. For example, the user may have specified the config.c variable on the command line that is only used by an imported project that is loaded in a subsequent generation. We are also relaxing it for values since conceptually the two feel the same. For a value the (hypothetical) example is a "common" variable set in a project root that is only queried in a subdirectory in a subsequent generation.
* Add support for for-loopBoris Kolpackov2017-11-091-2/+14
| | | | | | | | | | | | | | | | The semantics is similar to the C++11 range-based for: list = 1 2 3 for i: $list print $i Note that there is no scoping of any kind for the loop variable ('i' in the above example). See tests/loop/for.test for some examples/ideas. In the future the plan is to also support more general while-loop as well as break and continue.
* Issue diagnostics instead of asserting on variable type/visibility changeBoris Kolpackov2017-08-031-6/+8
|
* Experimental (and probably broken) pkg-config generation supportBoris Kolpackov2017-07-311-1/+1
|
* Make path value type to be base for dir_pathKaren Arutyunov2017-06-261-2/+7
|
* Add hxx extension for headersKaren Arutyunov2017-05-011-3/+3
|
* Specify config.test.output variableBoris Kolpackov2017-03-071-0/+78
|
* Add MT-safe variable_cache, use for variable overridesBoris Kolpackov2017-02-131-0/+3
|
* Track variable value modificationsBoris Kolpackov2017-02-131-13/+9
|
* Allow back overriding variables specified in buildfilesBoris Kolpackov2017-02-131-4/+10
| | | | | | | | It is still not clear whether this is the right thing to allow, conceptually, but with this disallowed it's hard to test this functionality. Perhaps we should have an attribute [overridable]. The problem is one will also have to set this variable to some value (e.g., [null]) which is not exactly the same as undefined (especially when testing).
* Redo variable pattern-typing to match in more specific orderBoris Kolpackov2017-02-131-12/+57
|
* Add load generation to global variable_map valuesBoris Kolpackov2017-02-131-20/+57
|
* Add global flag to variable_mapBoris Kolpackov2017-02-131-1/+1
|
* Add notion of load phase generationBoris Kolpackov2017-02-131-3/+9
|
* Implement pattern-based variable typing, tighten variable type updateBoris Kolpackov2017-02-131-54/+129
|
* Add notion of phase, enforceBoris Kolpackov2017-02-131-9/+38
|
* Add model mutex, make var_pool const by defaultBoris Kolpackov2017-02-131-3/+22
|
* Store platform targets as typed target_tripletBoris Kolpackov2017-01-061-0/+45
|
* Update copyright yearBoris Kolpackov2017-01-051-1/+1
|
* Add support for typed/untyped concatenated expansionBoris Kolpackov2016-11-301-42/+26
|
* Implement value type propagation on expansionBoris Kolpackov2016-11-231-5/+68
| | | | | | 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.
* Add function machinery, implement path.normalize()Boris Kolpackov2016-11-181-32/+75
| | | | | Note that multi-argument functions are not yet "callable" since there is no support for value packs.
* Minor dependency cleanupBoris Kolpackov2016-11-041-5/+0
|
* Various design/implementation cleanupsBoris Kolpackov2016-11-041-8/+15
|
* Reverse empty simple values as an empty names sequence rather than empty nameBoris Kolpackov2016-08-231-11/+16
| | | | | | | | | | This way we get: config.import.foo = Rather than: config.import.foo = {}
* Don't complete empty abs_dir_pathBoris Kolpackov2016-08-231-3/+6
| | | | The empty value is used as a special indicator
* Cache process_path, use fallback search directory for binutilsBoris Kolpackov2016-08-221-0/+98
|
* Actualize project root directoriesBoris Kolpackov2016-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | This solves the problem of changing path spelling on platforms with case- insensitive filesystems. For example, you may build a project in the current working directory without specifying any paths. This means the current working directory will be used as the project's root. On Windows this could be C:\x. Now you are building another project that imports the above project and you specify config.import.x variable pointing to the above build. But you are lazy to type capital C so you spell it as config.import.x=c:\x. What happens now is the value from config.import.x is used as the project root. And now it is a different spelling compared to your original build. This is not a problem when the build system itself is concerned -- it is smart enough to use case-insensitive comparison. However, we often use roots to derive other things, say, -I options that we pass to compilers. And these options are normally no longer treated as (case-insensitive) paths. If they are hashed and the result stored in depdb, then we end up with rebuilds that are triggered by changes from C:\ to c:\.
* Adjust to new path implementation, use to support reversibilityBoris Kolpackov2016-07-281-13/+11
|
* Switch to dynamic empty() implementation in variable valueBoris Kolpackov2016-07-201-100/+69
| | | | The current model fell apart when we modified values directly.
* Implement support for <, >, <=, >= in eval contextBoris Kolpackov2016-07-201-0/+62
| | | | | | Now can write: if ($build.version > 30000)
* Add support for prepend/append in target type/pattern-specific varsBoris Kolpackov2016-07-161-11/+18
| | | | | | | | | | | | | | | | | 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 MSVCKaren Arutyunov2016-07-011-8/+7
|
* Work around static initialization order issueBoris Kolpackov2016-06-281-7/+22
| | | | | | value_traits<T>::value_type initialization is not constexpr in VC because of pointers to function template instantiations (which apparently are not constexpr).
* Add config.bin.target var/hint, use to decide libso{} install modeBoris Kolpackov2016-06-271-1/+1
| | | | | | | | Normally the user doesn't need to specify config.bin.target explicitly since the cxx module will hint it. We now also have the whole set of target's components: bin.target.{cpu,vendor,system,version,class}
* Add support for using value attributes in eval contextBoris Kolpackov2016-04-181-17/+41
| | | | | | | | | | For example: if ($x == [null]) Or: if ([uint64] 01 == [uint64] 1)