diff options
author | David Robillard <d@drobilla.net> | 2011-10-15 04:57:01 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-10-15 04:57:01 +0000 |
commit | 56667184e39cf6da7f8e780b75ec6eea4dab7b69 (patch) | |
tree | e08e190634b59e6286239309803508fe019b7c02 /autowaf.py | |
parent | 3cb4de51596be319b6911c358749fe3f4a3ecb96 (diff) | |
download | autowaf-56667184e39cf6da7f8e780b75ec6eea4dab7b69.tar.gz autowaf-56667184e39cf6da7f8e780b75ec6eea4dab7b69.tar.bz2 autowaf-56667184e39cf6da7f8e780b75ec6eea4dab7b69.zip |
Use variables in pkgconfig paths where possible (#782)
git-svn-id: http://svn.drobilla.net/autowaf@55 e2e4594f-ea7b-45dc-bc5a-5f5301e603aa
Diffstat (limited to 'autowaf.py')
-rw-r--r-- | autowaf.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -302,6 +302,14 @@ def build_pc(bld, name, version, version_suffix, libs, subst_dict={}): target += '-' + version_suffix target += '.pc' + libdir = bld.env['LIBDIR'] + if libdir.startswith(pkg_prefix): + libdir = libdir.replace(pkg_prefix, '${exec_prefix}') + + includedir = bld.env['INCLUDEDIR'] + if includedir.startswith(pkg_prefix): + includedir = includedir.replace(pkg_prefix, '${prefix}') + obj = bld(features = 'subst', source = '%s.pc.in' % name.lower(), target = target, @@ -309,8 +317,8 @@ def build_pc(bld, name, version, version_suffix, libs, subst_dict={}): exec_prefix = '${prefix}', PREFIX = pkg_prefix, EXEC_PREFIX = '${prefix}', - LIBDIR = bld.env['LIBDIR'], - INCLUDEDIR = bld.env['INCLUDEDIR']) + LIBDIR = libdir, + INCLUDEDIR = includedir) if type(libs) != list: libs = libs.split() |