aboutsummaryrefslogtreecommitdiff
path: root/build2/cli
AgeCommit message (Collapse)AuthorFilesLines
2020-04-27Rework tool importation along with cli moduleBoris Kolpackov6-283/+231
Specifically, now config.<tool> (like config.cli) is handled by the import machinery (it is like a shorter alias for config.import.<tool>.<tool>.exe that we already had). And the cli module now uses that instead of custom logic. This also adds support for uniform tool metadata extraction that is handled by the import machinery. As a result, a tool that follows the "build2 way" can be imported with metadata by the buildfile and/or corresponding module without any tool-specific code or brittleness associated with parsing --version or similar outputs. See the cli tool/module for details. Finally, two new flavors of the import directive are now supported: import! triggers immediate importation skipping any rule-specific logic while import? is optional import (analogous to using?). Note that optional import is always immediate. There is also the import-specific metadata attribute which can be specified for these two import flavors in order to trigger metadata importation. For example: import? [metadata] cli = cli%exe{cli} if ($cli != [null]) info "cli version $($cli:cli.version)"
2020-03-31Switch to project variable visibility by defaultBoris Kolpackov1-6/+4
2020-03-17Rework config::{omitted,required,optional}() into unified config_lookup()Boris Kolpackov1-19/+20
2020-03-11Minor config variable lookup cleanupsBoris Kolpackov1-3/+3
2020-02-07Drop copyright notice from source codeKaren Arutyunov6-6/+0
2020-01-29Rename module_base to module, redo module boot/init argument passingBoris Kolpackov1-7/+3
2020-01-28Use scope::var_pool()Boris Kolpackov1-7/+7
2020-01-28Use scope::insert_rule()Boris Kolpackov1-8/+6
2020-01-27Improve module loading APIBoris Kolpackov1-1/+1
2019-10-14Implement MSVC installation discovery for version 15 (2017) and laterKaren Arutyunov1-1/+1
In particular, this removes the requirement to build from the Visual Studio command prompt. Note that since MSVC compiler binaries are target-specific (i.e., there are no -m32/-m64 options nor something like /MACHINE), in this case we default to a 64-bit build (a 32-bit build can still be achieved by running from a suitable command prompt). Finally, this mechanism is also used to find Clang bundled with MSVC.
2019-08-28Add build2_cli_load()Karen Arutyunov2-17/+25
2019-08-28Move cxx build system module to separate libraryKaren Arutyunov2-2/+2
2019-08-26Make target types project-wideBoris Kolpackov1-5/+4
2019-08-23Introduce notion of build contextBoris Kolpackov3-11/+12
All non-const global state is now in class context and we can now have multiple independent builds going on at the same time.
2019-07-05Move config, dist, test, and install modules into libraryKaren Arutyunov1-2/+2
2019-07-01Split build system into library and driverBoris Kolpackov6-21/+21
2019-06-19Improve diagnosticsBoris Kolpackov1-3/+3
2019-06-05Tweak generated header heuristics, add more diagnosticsBoris Kolpackov1-1/+1
2019-04-08Support for --dry-run|-n mode, perform update partBoris Kolpackov1-3/+5
2019-01-16Update copyright yearKaren Arutyunov6-6/+6
2018-11-28Add --[no-]mtime-check options to control this behavior at runtimeBoris Kolpackov1-1/+1
By default the checks are enabled only for the staged toolchain.
2018-11-22Make backwards modification time check permanent, add another experimentBoris Kolpackov1-8/+9
2018-11-19Finalize workaround for backwards modification time issueBoris Kolpackov1-1/+1
2018-11-05Only search for external tools (compilers, linkers, etc) in PATHBoris Kolpackov1-1/+7
Specifically, omit the current executable's directory on Windows since there is no reason for them to be found there automagically and this can lead to surprising behavior (for example, our MinGW GCC being used instead of the user's even though the user's is in PATH before ours).
2018-10-19Suggest override variable (config.x) when tool is not foundBoris Kolpackov1-2/+4
2018-07-30Fortify cli detection against "other" cli's (like Mono JIT compiler)Boris Kolpackov1-12/+25
2018-07-16Implement in moduleBoris Kolpackov1-2/+2
Given test.in containing something along these lines: foo = $foo$ Now we can do: using in file{test}: in{test.in} file{test}: foo = FOO The alternative variable substitution symbol can be specified with the in.symbol variable and lax (instead of the default strict) mode with in.substitution. For example: file{test}: in.symbol = '@' file{test}: in.substitution = lax
2018-06-29Use depdb to track changes to cli compiler, options, etcBoris Kolpackov2-22/+88
2018-06-28Implement support for excluded and ad hoc prerequisitesBoris Kolpackov1-41/+36
The inclusion/exclusion is controlled via the 'include' prerequisite-specific variable. Valid values are: false - exclude true - include adhoc - include but treat as an ad hoc input For example: lib{foo}: cxx{win32-utility}: include = ($cxx.targe.class == 'windows') exe{bar}: libs{plugin}: include = adhoc
2018-05-19Update copyright yearKaren Arutyunov6-6/+6
2018-02-07Initial work for default update outer operationBoris Kolpackov2-3/+5
While update still uses the old "all update rules update all their prerequisites" assumption, test and install have been fixed not to rely on this.
2018-02-03Get rid of action rule override semanticsBoris Kolpackov5-14/+14
Instead we now have two more or less separate match states for outer and inner parts of an action.
2017-12-17Trace non-zero process exit codeBoris Kolpackov1-1/+3
Also convert to using operator<<(ostream,process_exit).
2017-12-16Improve process execution diagnostics by reusing run_*() APIBoris Kolpackov2-18/+4
2017-12-07Distinguish between "fixed" and "default" target extensionsBoris Kolpackov1-10/+9
This fixes wrong merging of, say, file{README} and file{README.MySQL} (in libmysqlclient).
2017-11-24Fix few bugs in generated header path remapping logicBoris Kolpackov1-1/+1
2017-08-23Add perform_clean_group(), use instead of ad hoc implementation in cli ruleBoris Kolpackov2-33/+1
2017-08-05Add noteBoris Kolpackov1-0/+2
2017-05-01Add hxx extension for headersKaren Arutyunov6-40/+40
2017-04-28Implement support for pre-processing version headers (or other files)Boris Kolpackov1-14/+14
Also implement the build system version check.
2017-04-27Pass target to prerequisite searchBoris Kolpackov2-5/+8
2017-04-10Adapt to process_error changeKaren Arutyunov2-2/+2
2017-03-10Implement support for wildcard patternsBoris Kolpackov1-0/+2
2017-03-03Fix cli distribution via groupBoris Kolpackov2-18/+17
2017-03-02Implement parallel matchBoris Kolpackov4-81/+51
2017-02-13Tighten target constness furtherBoris Kolpackov3-30/+20
2017-02-13Use target:as<> instead of static_cast for target castingBoris Kolpackov2-3/+5
2017-02-13Pass const target& to recipesBoris Kolpackov2-8/+8
2017-02-13Implement target_set locking, including extension updateBoris Kolpackov1-7/+5
2017-02-13Store extension in target map key rather than in targetBoris Kolpackov3-8/+11
This is in preparation for locking its modification/access.