diff options
author | Alex Hirsch <w4rh4wk@bluephoenix.at> | 2018-03-09 18:42:44 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-18 10:49:40 +0000 |
commit | cbe18e01e49613f0db30c563c80767b30325bf39 (patch) | |
tree | 7d4dcba4347fa01aae1178d4ea072414c96d1f80 /mesonbuild/interpreter.py | |
parent | d7466066e468f9297bcad480003af882920c1159 (diff) | |
download | meson-cbe18e01e49613f0db30c563c80767b30325bf39.zip meson-cbe18e01e49613f0db30c563c80767b30325bf39.tar.gz meson-cbe18e01e49613f0db30c563c80767b30325bf39.tar.bz2 |
Deprecate `build_always`, add `build_always_stale`
Since `build_always` also adds a target to the set of default targets,
this option is marked deprecated in favour of the new option
`build_always_stale`.
`build_always_stale` *only* marks the target to be always considered out
of date, but does *not* add it to the set of default targets.
The old behaviour can still be achieved by combining
`build_always_stale` with `build_by_default`.
fixes #1942
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 343b7a5..eb09f3a 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1783,7 +1783,7 @@ permitted_kwargs = {'add_global_arguments': {'language'}, 'benchmark': {'args', 'env', 'should_fail', 'timeout', 'workdir', 'suite'}, 'build_target': known_build_target_kwargs, 'configure_file': {'input', 'output', 'configuration', 'command', 'copy', 'install_dir', 'install_mode', 'capture', 'install', 'format', 'output_format', 'encoding'}, - 'custom_target': {'input', 'output', 'command', 'install', 'install_dir', 'install_mode', 'build_always', 'capture', 'depends', 'depend_files', 'depfile', 'build_by_default'}, + 'custom_target': {'input', 'output', 'command', 'install', 'install_dir', 'install_mode', 'build_always', 'capture', 'depends', 'depend_files', 'depfile', 'build_by_default', 'build_always_stale'}, 'dependency': {'default_options', 'fallback', 'language', 'main', 'method', 'modules', 'optional_modules', 'native', 'required', 'static', 'version', 'private_headers'}, 'declare_dependency': {'include_directories', 'link_with', 'sources', 'dependencies', 'compile_args', 'link_args', 'link_whole', 'version'}, 'executable': build.known_exe_kwargs, @@ -3012,7 +3012,8 @@ root and issuing %s. source_dir, replace_string, regex_selector] + vcs_cmd - kwargs.setdefault('build_always', True) + kwargs.setdefault('build_by_default', True) + kwargs.setdefault('build_always_stale', True) return self.func_custom_target(node, [kwargs['output']], kwargs) @FeatureNew('subdir_done', '0.46.0') @@ -3025,7 +3026,7 @@ root and issuing %s. raise SubdirDoneRequest() @stringArgs - @FeatureNewKwargs('custom_target', '0.47.0', ['install_mode']) + @FeatureNewKwargs('custom_target', '0.47.0', ['install_mode', 'build_always_stale']) @FeatureNewKwargs('custom_target', '0.40.0', ['build_by_default']) @permittedKwargs(permitted_kwargs['custom_target']) def func_custom_target(self, node, args, kwargs): |