From 977e7f10dfd5ca0d21af9966bb5a7e54a7baeecb Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 17 Dec 2010 00:00:47 +0000 Subject: 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 --- autowaf.py | 12 +++++++----- 1 file 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' -- cgit v1.2.1