aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
AgeCommit message (Collapse)AuthorFilesLines
2020-05-27Add support for value subscript after expansionsBoris Kolpackov8-84/+210
Value subscript is only recognized in evaluation contexts (due to ambiguity with wildcard patterns; consider: $x[123].txt) and should be unseparated from the previous token. For example: x = ($y[1]) x = (($f ? $y : $z)[1]) x = ($identity($y)[$z])
2020-05-27Initial support for ad hoc recipes (still work in progress)Boris Kolpackov113-8137/+15653
2020-05-27Improve ternary diagnostics with info for wildcard pattern escapeBoris Kolpackov1-2/+13
2020-05-27Suppress skip count diagnostics if no progress was requestedBoris Kolpackov1-2/+5
2020-05-27Fix unregistered .regex file cleanup error in testscriptKaren Arutyunov1-1/+5
2020-05-27Amalgamation cutoff supportBoris Kolpackov7-64/+198
Now a project that disables amalgamation will not logically "see" an outer project even if it's physically inside its scope.
2020-05-27Use location_value in module_stateBoris Kolpackov2-4/+4
2020-05-22Get rid of now deprecated std::is_pod usageBoris Kolpackov2-9/+18
2020-05-22Fix bug in previous commitBoris Kolpackov1-1/+1
2020-05-22Make template definition available in all translation units where usedBoris Kolpackov5-30/+40
We were trying to be clever but GCC 10's IPA-SRA optimization didn't like it.
2020-05-01Fix outstanding issue with directive vs assignment differentiationBoris Kolpackov3-16/+42
Specifically, now the following does the right thing: print +foo
2020-04-30Verify path set by {src,out}-root.build files is absoluteBoris Kolpackov3-35/+55
2020-04-30Rename target::member to target::adhoc_memberBoris Kolpackov8-26/+34
2020-04-30Factor recipe to separate header/source filesBoris Kolpackov8-58/+86
2020-04-27Get rid of warningsBoris Kolpackov3-21/+32
2020-04-27Rework tool importation along with cli moduleBoris Kolpackov31-302/+1380
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-04-27Add utility config::{assign,append}_config() functionsBoris Kolpackov1-1/+43
2020-04-27Require explicit variable type in scope::{assign,append}()Boris Kolpackov2-30/+44
2020-04-27Make rule non-copyableBoris Kolpackov1-0/+5
2020-04-27Add support for untyped assignment to valueBoris Kolpackov2-1/+19
2020-04-27Add another search_existing() overloadBoris Kolpackov2-0/+19
2020-04-27Don't switch projects when switching scopes during bootstrapBoris Kolpackov5-30/+47
2020-04-27Add inject() for injecting additional dependencies during matchBoris Kolpackov2-0/+14
2020-04-27Fix assertion failure when name extension pattern is usedKaren Arutyunov1-0/+4
2020-04-16Fix crashing on unhandled io_error thrown by depdb::flush()Karen Arutyunov1-0/+9
2020-04-13Add ../share/pkgconfig/ search directory by default on LinuxBoris Kolpackov2-10/+20
2020-04-11Pass LC_ALL=C when extracting locale-dependent information in bin module on ↵Karen Arutyunov2-10/+50
POSIX
2020-04-08Allow configuration variables in unnamed projectsBoris Kolpackov2-13/+40
While generally a bad idea, there are valid situations where this may happen, such as a standalone build of the tests subproject in test-installed.
2020-04-08Document project-specific configuration supportBoris Kolpackov2-2/+3
2020-04-07Pass LC_ALL=C when extracting locale-dependent information on POSIXBoris Kolpackov5-26/+117
2020-04-03Tweak ~host configuration extraction regexBoris Kolpackov1-4/+6
2020-04-03Skip unmatched lines in $regex.replace_lines() if format_no_copy flag is ↵Karen Arutyunov1-3/+5
specified
2020-04-02Fix ~host config to only contain cc and bin modules configurationBoris Kolpackov5-14/+31
Also add ~build2 that contains everything (except config.dist.*) to be used for build system modules.
2020-03-31Tweak variable patterns not to break overridesBoris Kolpackov1-29/+32
2020-03-31Fix bug in install_path() call (Windows-specific)Boris Kolpackov1-2/+6
2020-03-31Handle duplicate config directives for same variableBoris Kolpackov2-2/+20
2020-03-31Use find instead of insert for variable lookup in install_{path,mode}()Boris Kolpackov1-2/+4
2020-03-31Switch to project variable visibility by defaultBoris Kolpackov19-248/+289
2020-03-27Fix bug in previous commitBoris Kolpackov1-2/+2
2020-03-27Implement project configuration reporting, similar to build system modulesBoris Kolpackov6-100/+304
2020-03-27Share parser for loading root.build and pre/post hooksBoris Kolpackov1-25/+43
2020-03-26Make buildfile parser reset'ableBoris Kolpackov2-21/+55
Note that the testscript parser (which derives from the buildfile parser) is (still) not reset'able (this functionality is currently not needed so why complicate things).
2020-03-25Enforce config directives only appearing in project's root.buildBoris Kolpackov3-39/+54
2020-03-25Diagnose unnamed project in version moduleBoris Kolpackov1-3/+6
2020-03-20Generate common .pc file in addition to static/staged when installing lib{}Boris Kolpackov8-27/+90
The common .pc file is produced by ignoring any static/shared-specific poptions and splitting loptions/libs into Libs/Libs.private. It is "best effort", in a sense that it's not guaranteed to be sufficient in all cases, but it will probably cover the majority of cases, even on Windows, thanks to automatic dllimport'ing of functions.
2020-03-20Don't install ad hoc members with nonexistent timestampBoris Kolpackov1-3/+3
2020-03-20Initial implementation of config directive for project-specific configurationBoris Kolpackov3-7/+144
2020-03-20Lexer support for default value assignment (?=)Boris Kolpackov5-6/+65
Note: not yet supported in the parser.
2020-03-20Don't install ad hoc members with unassigned pathsBoris Kolpackov1-8/+23
2020-03-20Tighten add_adhoc_member() against racesBoris Kolpackov1-14/+17