From 3e4668056386717e2fb39b6c1c79435facf84bc5 Mon Sep 17 00:00:00 2001 From: Laurent Carlier Date: Tue, 11 Jul 2017 13:42:59 +0200 Subject: pkgconfig: avoid appending slash at Cflags Otherwise it can break some compilations, see https://bugs.archlinux.org/task/54763 --- mesonbuild/modules/pkgconfig.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index 09c615a..c044d91 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -96,10 +96,11 @@ class PkgConfigModule(ExtensionModule): ofile.write('Libs.private: {}\n'.format(' '.join(generate_libs_flags(priv_libs)))) ofile.write('Cflags:') for h in subdirs: - if h == '.': - h = '' ofile.write(' ') - ofile.write(os.path.join('-I${includedir}', h)) + if h == '.': + ofile.write('-I${includedir}') + else: + ofile.write(os.path.join('-I${includedir}', h)) ofile.write('\n') def process_libs(self, libs): -- cgit v1.1