aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-11-03 22:59:57 -0400
committerIgor Gnatenko <ignatenko@redhat.com>2016-11-09 17:39:30 +0100
commit573b3afb5238f729d64dbdf6fb7602c26db91c71 (patch)
tree6605c99afc0628243f3a17924ed17f59f7c4755d
parent5fdac48250c0e4a7ad6e9b92041ab7b4d1bd02ec (diff)
downloadmeson-573b3afb5238f729d64dbdf6fb7602c26db91c71.zip
meson-573b3afb5238f729d64dbdf6fb7602c26db91c71.tar.gz
meson-573b3afb5238f729d64dbdf6fb7602c26db91c71.tar.bz2
backends: Output depfiles in same directory as target
-rw-r--r--mesonbuild/backend/backends.py5
-rw-r--r--mesonbuild/backend/ninjabackend.py4
2 files changed, 3 insertions, 6 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 5cc2442..2861bb6 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -599,10 +599,7 @@ class Backend():
elif '@DEPFILE@' in i:
if target.depfile is None:
raise MesonException('Custom target %s has @DEPFILE@ but no depfile keyword argument.' % target.name)
- if absolute_paths:
- dfilename = os.path.join(self.get_target_private_dir_abs(target), target.depfile)
- else:
- dfilename = os.path.join(self.get_target_private_dir(target), target.depfile)
+ dfilename = os.path.join(outdir, target.depfile)
i = i.replace('@DEPFILE@', dfilename)
elif '@PRIVATE_OUTDIR_' in i:
match = re.search('@PRIVATE_OUTDIR_(ABS_)?([-a-zA-Z0-9.@:]*)@', i)
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 63380bd..89d6a6f 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -494,8 +494,8 @@ int dummy;
cmd_type = 'custom'
if target.depfile is not None:
- rel_dfile = os.path.join(self.get_target_private_dir(target), target.depfile)
- abs_pdir = os.path.join(self.environment.get_build_dir(), self.get_target_private_dir(target))
+ rel_dfile = os.path.join(self.get_target_dir(target), target.depfile)
+ abs_pdir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target))
os.makedirs(abs_pdir, exist_ok=True)
elem.add_item('DEPFILE', rel_dfile)
elem.add_item('COMMAND', cmd)