diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-01-04 01:17:07 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-01-04 01:17:07 +0200 |
| commit | 2645053be21dab231c1d97d063acd19ea87f7577 (patch) | |
| tree | e7a11a5b2f9cba014c05770dc4fa9a1c99b22386 /wscript | |
| parent | e52ed7a5595568f169b3df74b675059c3d04da4a (diff) | |
| download | libgit2-2645053be21dab231c1d97d063acd19ea87f7577.tar.gz | |
Find proper path to 'ldconfig' on wscript
Don't hardcode the '/sbin/ldconfig' path; also, don't run anything if
ldconfig cannot be found (Mac OS X, for instance).
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'wscript')
| -rw-r--r-- | wscript | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -138,11 +138,14 @@ def build_library(bld, build_type): bld.install_files('${PREFIX}/include/git2', directory.ant_glob('src/git2/*.h')) # On Unix systems, let them know about installation - if bld.env.PLATFORM == 'unix' and bld.cmd in ['install-static', 'install-shared']: + if bld.env.PLATFORM == 'unix' and bld.cmd == 'install-shared': bld.add_post_fun(call_ldconfig) def call_ldconfig(bld): - bld.exec_command('/sbin/ldconfig') + import distutils.spawn as s + ldconf = s.find_executable('ldconfig') + if ldconf: + bld.exec_command(ldconf) def grep_test_header(text, test_file): return '\n'.join(l for l in test_file.read().splitlines() if text in l) |
