aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/dist/init.cxx
AgeCommit message (Collapse)AuthorFilesLines
2023-09-20Fix issue with fallback rule priority in dist moduleBoris Kolpackov1-2/+7
While at it, also remove workarounds for the same issue in the config and test modules.
2023-05-16Implement dist meta-operation without invoking install (GH issue #190)Boris Kolpackov1-9/+11
The use of install (or another install-like program) can still be forced with config.dist.cmd=install.
2022-12-01Make dist::rule reusable as baseBoris Kolpackov1-9/+5
2022-11-30Deal with order dependence in dist ruleBoris Kolpackov1-5/+9
2022-10-13Optimize by going straight to public variable pool where applicableBoris Kolpackov1-23/+29
2022-09-16Register fallback dist meta-operation rule for out of project targetsBoris Kolpackov1-1/+11
The problematic scenario this fixes is an ad hoc pattern rule (which we register for dist in order to inject any additional sources; see parser.cxx for details) that pulls a tool imported from the system (say /usr/bin/xxd).
2022-09-06Add ability to remap paths in distributionBoris Kolpackov1-1/+20
Specifically, the dist target-specific variable now can specify a path besides true or false. This path is the "imaginary" source location which is used to derive the corresponding distribution local. This location can be either a directory path (to remap with the same file name) or a file path (to remap with a different name). If the path is relative, then it's treated relative to the target directory. Note that to make things less error prone, simple paths without any directory separators are not allowed (use ./<name> instead). Note that if multiple targets end up with the same source location, the behavior is undefined and no diagnostics is issued. Note also that such remapping has no effect in the bootstrap distribution mode.
2022-05-06Minor terminology fix in diagnostics and commentsBoris Kolpackov1-1/+1
2022-04-06Add support for rule hintsBoris Kolpackov1-1/+1
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.
2021-04-07Register environment variables for hermetic build configurationsBoris Kolpackov1-0/+22
2020-09-29Add bootstrap distribution mode (!config.dist.bootstrap=true)Boris Kolpackov1-37/+83
In this mode the dist meta-operation does not load the project (but does bootstrap it) and adds all the source files into the distribution only ignoring files and directories that start with a dot. This mode is primarily meant for situation where the project cannot (yet) be loaded due to missing dependencies.
2020-08-16Add ability to initialize bootstrapped modules after loading root.buildBoris Kolpackov1-3/+1
2020-03-31Switch to project variable visibility by defaultBoris Kolpackov1-9/+6
2020-03-17Rework config::{omitted,required,optional}() into unified config_lookup()Boris Kolpackov1-8/+11
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2020-01-29Rename module_base to module, redo module boot/init argument passingBoris Kolpackov1-6/+3
2020-01-28Use scope::var_pool()Boris Kolpackov1-1/+1
2020-01-28Use scope::insert_rule()Boris Kolpackov1-2/+2
2019-11-04Add $config.export() functionBoris Kolpackov1-2/+1
This is similar to the config.export variable functionality except it can be called from within buildfiles. Note that this function can only be used during configure unless the config module creation was forced for other meta-operations with config.module=true in bootstrap.build.
2019-08-23Introduce notion of build contextBoris Kolpackov1-1/+1
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-24Move in build system module to separate libraryBoris Kolpackov1-2/+8
2019-07-05Move config, dist, test, and install modules into libraryKaren Arutyunov1-0/+192