From 08216a3a8691cc1e5eaaa8f862f3278f98cad94c Mon Sep 17 00:00:00 2001 From: TingPing Date: Wed, 11 Jul 2018 15:38:35 +0200 Subject: [PATCH] gnome.compile_resources: Put dependency directories before current source dir This avoids the problem of generated files with the same name as something in source existing and using the wrong file. --- mesonbuild/modules/gnome.py | 4 ++-- test cases/frameworks/7 gnome/resources/res3.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 test cases/frameworks/7 gnome/resources/res3.txt diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 0d1c22f32..46df53e98 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -154,10 +154,10 @@ class GnomeModule(ExtensionModule): # Make source dirs relative to build dir now source_dirs = [os.path.join(state.build_to_src, state.subdir, d) for d in source_dirs] - # Always include current directory, but after paths set by user - source_dirs.append(os.path.join(state.build_to_src, state.subdir)) # Ensure build directories of generated deps are included source_dirs += subdirs + # Always include current directory, but after paths set by user + source_dirs.append(os.path.join(state.build_to_src, state.subdir)) for source_dir in OrderedSet(source_dirs): cmd += ['--sourcedir', source_dir] diff --git a/test cases/frameworks/7 gnome/resources/res3.txt b/test cases/frameworks/7 gnome/resources/res3.txt new file mode 100644 index 000000000..aeed4a552 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/res3.txt @@ -0,0 +1 @@ +This file is from the wrong directory.