| Index: native_client_sdk/src/build_tools/generate_make.py
|
| diff --git a/native_client_sdk/src/build_tools/generate_make.py b/native_client_sdk/src/build_tools/generate_make.py
|
| index 9be8e0275d73424eb7115c402658df9328f6d28b..941de65bf15467ea30c33de158d460c3848964d5 100755
|
| --- a/native_client_sdk/src/build_tools/generate_make.py
|
| +++ b/native_client_sdk/src/build_tools/generate_make.py
|
| @@ -276,7 +276,7 @@ def ValidateFormat(src, dsc_format, ErrorMsg=ErrorMsgFunc):
|
| if exp_type is str:
|
| if type(exp_value) is list and exp_value:
|
| if value not in exp_value:
|
| - ErrorMsg('Value %s not expected for %s.' % (value, key))
|
| + ErrorMsg("Value '%s' not expected for %s." % (value, key))
|
| failed = True
|
| continue
|
|
|
| @@ -394,7 +394,7 @@ def LoadProject(filename, toolchains):
|
| if it matches the set of requested toolchains. Return None if the
|
| project is filtered out."""
|
|
|
| - print '\n\nProcessing %s...' % filename
|
| + print 'Processing %s...' % filename
|
| # Default src directory is the directory the description was found in
|
| desc = open(filename, 'r').read()
|
| desc = eval(desc, {}, {})
|
| @@ -527,21 +527,22 @@ def GenerateMasterMakefile(in_path, out_path, projects):
|
|
|
|
|
| def main(argv):
|
| - parser = optparse.OptionParser()
|
| + usage = "usage: generate_make [options] <dsc_file ..>"
|
| + parser = optparse.OptionParser(usage=usage)
|
| parser.add_option('--dstroot', help='Set root for destination.',
|
| - dest='dstroot', default=os.path.join(OUT_DIR, 'pepper_canary'))
|
| + default=os.path.join(OUT_DIR, 'pepper_canary'))
|
| parser.add_option('--master', help='Create master Makefile.',
|
| - action='store_true', dest='master', default=False)
|
| + action='store_true', default=False)
|
| parser.add_option('--newlib', help='Create newlib examples.',
|
| - action='store_true', dest='newlib', default=False)
|
| + action='store_true', default=False)
|
| parser.add_option('--glibc', help='Create glibc examples.',
|
| - action='store_true', dest='glibc', default=False)
|
| + action='store_true', default=False)
|
| parser.add_option('--pnacl', help='Create pnacl examples.',
|
| - action='store_true', dest='pnacl', default=False)
|
| + action='store_true', default=False)
|
| parser.add_option('--host', help='Create host examples.',
|
| - action='store_true', dest='host', default=False)
|
| + action='store_true', default=False)
|
| parser.add_option('--experimental', help='Create experimental examples.',
|
| - action='store_true', dest='experimental', default=False)
|
| + action='store_true', default=False)
|
|
|
| toolchains = []
|
| platform = getos.GetPlatform()
|
| @@ -561,13 +562,15 @@ def main(argv):
|
|
|
| # By default support newlib and glibc
|
| if not toolchains:
|
| - toolchains = ['newlib', 'glibc']
|
| - print 'Using default toolchains: ' + ' '.join(toolchains)
|
| + toolchains = ['newlib', 'glibc', 'pnacl']
|
|
|
| master_projects = {}
|
|
|
| landing_page = LandingPage()
|
| - for filename in args:
|
| + for i, filename in enumerate(args):
|
| + if i:
|
| + # Print two newlines between each dsc file we process
|
| + print '\n'
|
| desc = LoadProject(filename, toolchains)
|
| if not desc:
|
| print 'Skipping %s, not in [%s].' % (filename, ', '.join(toolchains))
|
|
|