provide a mechanism for ./waf dist to work without hardcoding APPNAME in wscript
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 13 Aug 2015 18:32:32 +0000 (14:32 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 13 Aug 2015 18:32:38 +0000 (14:32 -0400)
wscript

diff --git a/wscript b/wscript
index 3e72fbc9720199e4e5c2a741cd9590373841d5e7..0986252e799f105a4f530355b3021d886fd805ea 100644 (file)
--- 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'