summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-17 00:00:47 +0000
committerDavid Robillard <d@drobilla.net>2010-12-17 00:00:47 +0000
commit977e7f10dfd5ca0d21af9966bb5a7e54a7baeecb (patch)
tree3a40684365618555298d575bf2d90b5839d0c90c
parent0ef880bc937550bdb4bfb1081289786d38b91184 (diff)
downloadautowaf-977e7f10dfd5ca0d21af9966bb5a7e54a7baeecb.tar.gz
autowaf-977e7f10dfd5ca0d21af9966bb5a7e54a7baeecb.tar.bz2
autowaf-977e7f10dfd5ca0d21af9966bb5a7e54a7baeecb.zip
Replace shutdown hook with explicit run_ldconfig for use with ctx.add_post_fun.
git-svn-id: http://svn.drobilla.net/autowaf@13 e2e4594f-ea7b-45dc-bc5a-5f5301e603aa
-rw-r--r--autowaf.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/autowaf.py b/autowaf.py
index 929a58d..617794a 100644
--- a/autowaf.py
+++ b/autowaf.py
@@ -453,9 +453,11 @@ def run_tests(ctx, appname, tests):
os.chdir(orig_dir)
-def shutdown():
- # This isn't really correct (for packaging), but people asking is annoying
- if 'install' in Options.commands:
- try: os.popen("/sbin/ldconfig")
- except: pass
+def run_ldconfig(ctx):
+ if ctx.cmd == 'install':
+ print 'Running /sbin/ldconfig'
+ try:
+ os.popen("/sbin/ldconfig")
+ except:
+ print >> sys.stderr, 'Error running ldconfig, libraries may not be linkable'