aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/functions-name.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-01-11Fix name recomposition bug in $name.filter*() functionsBoris Kolpackov1-2/+11
2023-12-03Support dir{}/fsdir{} idiosyncrasies in $name.*() function familyBoris Kolpackov1-0/+6
2023-12-03Reimplement search_existing() functions via target_type::searchBoris Kolpackov1-0/+3
This allows us to automatically get the target type-specific behavior with regards to the out_only semantics (added in the previous commit) instead of passing it explicitly from each call site.
2023-08-09Complete and cleanup function documentation in preparation for auto-extractionBoris Kolpackov1-108/+52
Also: - Move the $target.*() function family from functions-name.cxx to separate functions-target.cxx. - Get rid of the separate $process_path_ex.*() family, merging it with $process_path.*().
2023-07-20Improve diagnosticsBoris Kolpackov1-3/+16
2022-12-14Handle NULL values in $string() and $concat() functionsBoris Kolpackov1-1/+12
This is relied upon by the parser to provide conversion/concatenation semantics consistent with untyped values. Note that we handle NULL values only for types that have empty representation.
2022-09-29Add $find(<sequence>, <value>), $find_index(<sequence>, <value>) functionsBoris Kolpackov1-0/+25
The $find() function returns true if the sequence contains the specified value. The $find_index() function returns the index of the first element in the sequence that is equal to the specified value or $size(<sequence>) if none is found. For string sequences, it's possible to request case- insensitive comparison with a flag.
2022-09-23Add $is_a(<name>, <target-type>), $filter[_out](<names>, <target-types>) ↵Boris Kolpackov1-12/+118
functions $is_a() returns true if the <name>'s target type is-a <target-type>. Note that this is a dynamic type check that takes into account target type inheritance. $filter[_out]() return names with target types which are-a (filter) or not are-a (filter_out) one of <target-types>. In particular, these functions are useful for filtering prerequisite targets ($<) in ad hoc recipes and rules.
2022-07-07Fix incorrect function family assignment for $target.process_path()Boris Kolpackov1-1/+1
2022-01-21Add another overload of to_target(), declare in functions-name.hxxBoris Kolpackov1-3/+12
2021-11-04Add $size() function to get size of sequence (names, strings, etc)Boris Kolpackov1-0/+41
2021-11-02Add $sort() functionBoris Kolpackov1-0/+2
Available overloads: $sort(<names> [, <flags>]) $sort(<ints> [, <flags>]) $sort(<strings> [, <flags>]) $sort(<paths> [, <flags>]) $sort(<dir_paths> [, <flags>]) The following flag is supported by the all overloads: dedup - in addition to sorting also remove duplicates Additionally, the strings overload also support the following flag: icase - sort ignoring case Note that on case-insensitive filesystem the paths and dir_paths overload's order is case-insensitive.
2021-10-13Allow out-qualified names in $name.*() function familyBoris Kolpackov1-19/+36
2021-09-14Add support for passing multiple names to $name.*() functionsBoris Kolpackov1-3/+49
2020-12-04Mark Buildfile functions as pure or impureBoris Kolpackov1-13/+21
2020-11-11Add ${c,cxx}.lib_{poptions,libs,rpaths}() functionsBoris Kolpackov1-1/+3
These functions can be used to query library metadata for options and libraries that should be used when compiling/linking dependent targets, similar to how cc::{compile,link}_rule do it. With this support it should be possible to more or less re-create their semantics in ad hoc recipes.
2020-06-03Fix function family for $target.path()Karen Arutyunov1-1/+1
2020-06-02Add $target.process_path() analogous to $target.path()Boris Kolpackov1-1/+29
2020-05-27Initial support for ad hoc recipes (still work in progress)Boris Kolpackov1-26/+82
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2019-08-23Introduce notion of build contextBoris Kolpackov1-3/+3
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-01Split build system into library and driverBoris Kolpackov1-0/+109