aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/dump.cxx
AgeCommit message (Collapse)AuthorFilesLines
2022-10-13Switch to public/private variables modelBoris Kolpackov1-2/+2
Now unqualified variables are project-private and can be typified.
2022-04-06Add support for specifying custom ad hoc pattern rule namesBoris Kolpackov1-0/+8
Besides diagnostics, this allows us to use name in the rule hint, for example: [rule_name=hello.link] exe{~'/(.*)/'}: obje{~'/\1/'} {{ $cxx.path -o $path($>) $path($<[0]) }} [rule_hint=hello] exe{hello}: obje{hello} obje{hello}: c{hello-c}
2022-04-06Add support for rule hintsBoris Kolpackov1-1/+32
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-06-08Implement ad hoc regex pattern rule supportBoris Kolpackov1-23/+68
An ad hoc pattern rule consists of a pattern that mimics a dependency declaration followed by one or more recipes. For example: exe{~'/(.*)/'}: cxx{~'/\1/'} {{ $cxx.path -o $path($>) $path($<[0]) }} If a pattern matches a dependency declaration of a target, then the recipe is used to perform the corresponding operation on this target. For example, the following dependency declaration matches the above pattern which means the rule's recipe will be used to update this target: exe{hello}: cxx{hello} While the following declarations do not match the above pattern: exe{hello}: c{hello} # Type mismatch. exe{hello}: cxx{howdy} # Name mismatch. On the left hand side of `:` in the pattern we can have a single target or an ad hoc target group. The single target or the first (primary) ad hoc group member must be a regex pattern (~). The rest of the ad hoc group members can be patterns or substitutions (^). For example: <exe{~'/(.*)/'} file{^'/\1.map/'}>: cxx{~'/\1/'} {{ $cxx.path -o $path($>[0]) "-Wl,-Map=$path($>[1])" $path($<[0]) }} On the left hand side of `:` in the pattern we have prerequisites which can be patterns, substitutions, or non-patterns. For example: <exe{~'/(.*)/'} file{^'/\1.map/'}>: cxx{~'/\1/'} hxx{^'/\1/'} hxx{common} {{ $cxx.path -o $path($>[0]) "-Wl,-Map=$path($>[1])" $path($<[0]) }} Substitutions on the left hand side of `:` and substitutions and non-patterns on the right hand side are added to the dependency declaration. For example, given the above rule and dependency declaration, the effective dependency is going to be: <exe{hello} file{hello.map>: cxx{hello} hxx{hello} hxx{common}
2021-05-28Add support for regex-based target type/pattern specific variablesBoris Kolpackov1-2/+8
This is in addition to the already supported path-based target type/pattern specific variables. For example: hxx{*}: x = y # path-based hxx{~/.*/}: x = y # regex-based
2021-03-19Redo entering of src directories into scope_mapBoris Kolpackov1-4/+6
2021-02-08Enter scope src directories into scope mapBoris Kolpackov1-8/+9
2020-06-19Get rid of unnecessary copyBoris Kolpackov1-1/+1
2020-06-05Add ability to specify ad hoc recipe actionsBoris Kolpackov1-1/+12
We are reusing the buildspec syntax for that.
2020-05-27Initial support for ad hoc recipes (still work in progress)Boris Kolpackov1-62/+137
2020-05-27Amalgamation cutoff supportBoris Kolpackov1-0/+5
Now a project that disables amalgamation will not logically "see" an outer project even if it's physically inside its scope.
2020-03-17Rename all find*(variable) to lookup*(variable)Boris Kolpackov1-1/+1
Now we consistently use term "lookup" for variable value lookup. At some point we should also rename type lookup to binding and get rid of all the lookup_type aliases.
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2019-08-23Introduce notion of build contextBoris Kolpackov1-7/+9
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-08-21Cleanup context.hxx and its usageBoris Kolpackov1-1/+0
2019-07-01Split build system into library and driverBoris Kolpackov1-0/+491