From e9f66b19305aa709d43f8395a6008638467d45d5 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 6 Oct 2016 21:51:31 -0400 Subject: pkgconfig: Prevent trailing space Prepend instead of appending a space so that we never end with a trailing space. --- mesonbuild/modules/pkgconfig.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index 9c235b5..0cd2b57 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -61,26 +61,26 @@ class PkgConfigModule: if len(priv_libs) > 0: ofile.write( 'Libraries.private: {}\n'.format(' '.join(priv_libs))) - ofile.write('Libs: -L${libdir} ') + ofile.write('Libs: -L${libdir}') msg = 'Library target {0!r} has {1!r} set. Compilers ' \ 'may not find it from its \'-l{2}\' linker flag in the ' \ '{3!r} pkg-config file.' for l in libraries: if l.custom_install_dir: - ofile.write('-L${prefix}/%s ' % l.custom_install_dir) + ofile.write(' -L${prefix}/%s ' % l.custom_install_dir) lname = self._get_lname(l, msg, pcfile) # If using a custom suffix, the compiler may not be able to # find the library if l.name_suffix_set: mlog.log(mlog.red('WARNING:'), msg.format(l.name, 'name_suffix', lname, pcfile)) - ofile.write('-l{} '.format(lname)) + ofile.write(' -l{} '.format(lname)) ofile.write('\n') - ofile.write('CFlags: ') + ofile.write('CFlags:') for h in subdirs: if h == '.': h = '' - ofile.write(os.path.join('-I${includedir}', h)) ofile.write(' ') + ofile.write(os.path.join('-I${includedir}', h)) ofile.write('\n') def generate(self, state, args, kwargs): -- cgit v1.1