provide a mechanism for ./waf dist to work without hardcoding APPNAME in wscript

This commit is contained in:
Paul Davis 2015-08-13 14:32:32 -04:00
parent 88229c4bef
commit c2d6249370

View File

@ -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'