From cbe18e01e49613f0db30c563c80767b30325bf39 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Fri, 9 Mar 2018 18:42:44 +0100 Subject: 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 --- mesonbuild/backend/backends.py | 2 +- mesonbuild/backend/ninjabackend.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/backend') diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index e423473..7eccca4 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -750,7 +750,7 @@ class Backend: result = OrderedDict() # Get all build and custom targets that must be built by default for name, t in self.build.get_targets().items(): - if t.build_by_default or t.install or t.build_always: + if t.build_by_default or t.install: result[name] = t # Get all targets used as test executables and arguments. These must # also be built by default. XXX: Sometime in the future these should be diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 48f5fc2..9d72225 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -504,7 +504,7 @@ int dummy; deps = self.unwrap_dep_list(target) deps += self.get_custom_target_depend_files(target) desc = 'Generating {0} with a {1} command.' - if target.build_always: + if target.build_always_stale: deps.append('PHONY') if target.depfile is None: rulename = 'CUSTOM_COMMAND' -- cgit v1.1