diff options
author | Guillaume Poirier-Morency <guillaumepoiriermorency@gmail.com> | 2016-10-06 21:51:31 -0400 |
---|---|---|
committer | Guillaume Poirier-Morency <guillaumepoiriermorency@gmail.com> | 2016-10-16 11:04:40 -0400 |
commit | e9f66b19305aa709d43f8395a6008638467d45d5 (patch) | |
tree | 249ccaa7fd811689cddab48781ec83a9f8c38431 | |
parent | f30be6fb9232b297d9da73d01d8053bbf4b409fb (diff) | |
download | meson-e9f66b19305aa709d43f8395a6008638467d45d5.zip meson-e9f66b19305aa709d43f8395a6008638467d45d5.tar.gz meson-e9f66b19305aa709d43f8395a6008638467d45d5.tar.bz2 |
pkgconfig: Prevent trailing space
Prepend instead of appending a space so that we never end with a
trailing space.
-rw-r--r-- | mesonbuild/modules/pkgconfig.py | 10 |
1 files 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): |