From c2d624937020569b5710e7c3ded1cf36cba6b235 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 13 Aug 2015 14:32:32 -0400 Subject: [PATCH] provide a mechanism for ./waf dist to work without hardcoding APPNAME in wscript --- wscript | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wscript b/wscript index 3e72fbc972..0986252e79 100644 --- a/wscript +++ b/wscript @@ -186,6 +186,13 @@ V = MAJOR + '.' + MINOR + '.' + MICRO VERSION = str (V.encode ('ascii', 'ignore')) PROGRAM_VERSION = str (MAJOR.encode ('ascii', 'ignore')) +if len (sys.argv) > 1 and sys.argv[1] == 'dist': + if not 'APPNAME' in os.environ: + print "You must define APPNAME in the environment when running ./waf dist" + sys.exit (1) + APPNAME = os.environ['APPNAME']; + + # Mandatory variables top = '.' out = 'build'