aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-05-06 20:09:49 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-05-06 20:25:16 +0530
commitc1f275bfa644beafab9f8572351d4b64d61c148b (patch)
tree5e426407e55b89d51db50f131e1c29631f0ce5b9 /mesonbuild/modules/gnome.py
parentc5865c50c444912afd92c2feb94d8739874a62b2 (diff)
downloadmeson-c1f275bfa644beafab9f8572351d4b64d61c148b.zip
meson-c1f275bfa644beafab9f8572351d4b64d61c148b.tar.gz
meson-c1f275bfa644beafab9f8572351d4b64d61c148b.tar.bz2
gnome.gtkdoc: Allow passing file objects as xml_files
If we pass a source files() object, we will look for it in the build directory, which is wrong. If we pass a build files() object (from configure_file()), we will find it in the build directory, and then try to copy it on top of itself in gtkdochelper.py getting a SameFileError. Add a test for it, and also properly iterate custom target outputs when adding to content files.
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 12f6412..e553b4a 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -793,11 +793,13 @@ This will become a hard error in the future.''')
s = s.held_object
if isinstance(s, (build.CustomTarget, build.CustomTargetIndex)):
depends.append(s)
- content_files.append(os.path.join(state.environment.get_build_dir(),
- state.backend.get_target_dir(s),
- s.get_outputs()[0]))
+ for o in s.get_outputs():
+ content_files.append(os.path.join(state.environment.get_build_dir(),
+ state.backend.get_target_dir(s),
+ o))
elif isinstance(s, mesonlib.File):
- content_files.append(os.path.join(state.environment.get_build_dir(), s.subdir, s.fname))
+ content_files.append(s.absolute_path(state.environment.get_source_dir(),
+ state.environment.get_build_dir()))
elif isinstance(s, build.GeneratedList):
depends.append(s)
for gen_src in s.get_outputs():