diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-29 19:31:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-29 19:31:16 +0200 |
commit | 2720b45ef0ca9fd58c11fd9b4f000e1cf3a0819d (patch) | |
tree | 4505f65e4f997889e01d4b69bdf94257223d3dc6 /build2/algorithm | |
parent | 47e89b188ac71627f43e0bb8c47ffe08f6c1b919 (diff) |
Implement initial support for library versioning
Currently we only support platform-independent versions that get appended
to the library name. The magic incantation is this:
lib{foo}: bin.lib.version = @-1.2
This will produce libfoo-1.2.so, libfoo-1.2.dll, etc.
In the future we will support things like this:
lib{foo}: bin.lib.version = linux@1.2.3 freebsd@1.2 windows@1.2
Diffstat (limited to 'build2/algorithm')
-rw-r--r-- | build2/algorithm | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/build2/algorithm b/build2/algorithm index 651ef24..9f43475 100644 --- a/build2/algorithm +++ b/build2/algorithm @@ -233,22 +233,32 @@ namespace build2 perform_clean_depdb (action, target&); // Helper for custom perform(clean) implementations that cleans extra files - // and directories (recursively) specified as a list of extensions. The - // extension string can be NULL, in which case it is ignored. If the first - // character is '/', then the resulting path is treated as a directory - // rather than a file. Next can come zero or more '-' characters which - // indicate the number of extensions that should stripped before the new - // extension (if any) is added (so if you want to strip the extension, - // specify "-"). For example: + // and directories (recursively) specified as a list of either absolute + // paths or "path derivation directives". The directive string can be NULL, + // or empty in which case it is ignored. If the last character in a + // directive is '/', then the resulting path is treated as a directory + // rather than a file. The directive can start with zero or more '-' + // characters which indicate the number of extensions that should be + // stripped before the new extension (if any) is added (so if you want to + // strip the extension, specify just "-"). For example: // - // clean_extra (a, t, {".d", "/.dlls", "-.dll"}); + // clean_extra (a, t, {".d", ".dlls/", "-.dll"}); // // The extra files/directories are removed first in the specified order // followed by the ad hoc group member, then target itself, and, finally, // the prerequisites in the reverse order. // + // You can also clean extra files derived from adhoc group members. + // target_state - clean_extra (action, file&, initializer_list<const char*> extra_ext); + clean_extra (action, file&, + initializer_list<initializer_list<const char*>> extra); + + inline target_state + clean_extra (action a, file& f, initializer_list<const char*> extra) + { + return clean_extra (a, f, {extra}); + } } #include <build2/algorithm.ixx> |