diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2022-10-16 18:19:33 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-10-16 18:19:33 +0300 |
commit | 2b43f1ec1dd72e774162642c91421f4a6ae38f9c (patch) | |
tree | f2e544cf9a1dac65797a6ac06ae1cfdc24f504e1 /mesonbuild/utils | |
parent | 5937bbf6ee99d31b2f7d47d4e5cae7892bcb88d8 (diff) | |
download | meson-biggen.zip meson-biggen.tar.gz meson-biggen.tar.bz2 |
Add support for opaque build targets. Closes #10627.biggen
Diffstat (limited to 'mesonbuild/utils')
-rw-r--r-- | mesonbuild/utils/universal.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py index aaefbc5..a8f2d97 100644 --- a/mesonbuild/utils/universal.py +++ b/mesonbuild/utils/universal.py @@ -1,4 +1,4 @@ -# Copyright 2012-2020 The Meson development team +# Copyright 2012-2022 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -94,6 +94,7 @@ __all__ = [ 'get_compiler_for_source', 'get_filenames_templates_dict', 'get_library_dirs', + 'get_opaque_data', 'get_variable_regex', 'get_wine_shortpath', 'git', @@ -2277,3 +2278,21 @@ def first(iter: T.Iterable[_T], predicate: T.Callable[[_T], bool]) -> T.Optional if predicate(i): return i return None + +class OpaqueData: + def __init__(self, scratch, out, stamp, dep): + self.scratch = scratch + self.out = out + self.stamp = stamp + self.dep = dep + +def get_opaque_data(subproject, target_name): + if subproject: + sub_str = subproject + '_' + else: + sub_str = '' + gendir = 'meson-gen' + return OpaqueData(os.path.join(gendir, sub_str, target_name + '_s'), + os.path.join(gendir, sub_str, target_name), + target_name + '.stamp', + target_name + '.d') |