aboutsummaryrefslogtreecommitdiff
path: root/build2/cli
AgeCommit message (Collapse)AuthorFilesLines
2023-04-13Move cli module to libbuild2-cli libraryBoris Kolpackov7-862/+0
This is a temporary measure (until we unboundle this module) needed for in-process configure support in bpkg.
2022-11-18Complete low verbosity diagnostics reworkBoris Kolpackov1-1/+1
2022-11-08Make process exit diagnostics consistentBoris Kolpackov1-1/+1
In particular, we now always print error message on non-0 exit except in cases where such exit is ignored.
2022-11-08More work on child process diagnostics bufferingBoris Kolpackov1-2/+4
2022-10-13Optimize by going straight to public variable pool where applicableBoris Kolpackov1-1/+3
2022-04-15Get rid of target::dynamic_type() virtual functionBoris Kolpackov1-6/+10
Instead of overriding this function, derived targets must now set the dynamic_type variable to their static_type in their constructor body.
2022-04-07Rename {match,execute}() to *_sync(), add *_complete()Boris Kolpackov1-1/+1
In particular, the match() rename makes sure it doesn't clash with rule::match() which, after removal of the hint argument in simple_rule, has exactly the same signature, thus making it error-prone to calling recursively.
2022-04-06Add support for rule hintsBoris Kolpackov3-4/+4
A rule hint is a target attribute, for example: [rule_hint=cxx] exe{hello}: c{hello} Rule hints can be used to resolve ambiguity when multiple rules match the same target as well as to override an unambiguous match.
2022-03-07Add support for update=unmatch|match to ad hoc recipesBoris Kolpackov1-1/+3
2022-02-07Add support for meta-operation wildcard in scope::insert_rule()Boris Kolpackov1-11/+5
2021-12-15Return stable imported target name from import_direct()Boris Kolpackov1-3/+3
2020-08-16Redo modules map as vectorBoris Kolpackov1-10/+10
2020-07-13Add ability to extend rule interface in source-compatible mannerBoris Kolpackov1-1/+1
2020-05-27Initial support for ad hoc recipes (still work in progress)Boris Kolpackov1-1/+2
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