mirror of https://github.com/ARMmbed/mbed-os.git
Small source code and print indent refactoring
parent
48daa3c4a5
commit
fee2533ab9
|
@ -45,30 +45,76 @@ if __name__ == '__main__':
|
|||
parser = get_default_options_parser()
|
||||
|
||||
# Extra libraries
|
||||
parser.add_option("-r", "--rtos", action="store_true", dest="rtos",
|
||||
default=False, help="Compile the rtos")
|
||||
parser.add_option("-e", "--eth", action="store_true", dest="eth",
|
||||
default=False, help="Compile the ethernet library")
|
||||
parser.add_option("-U", "--usb_host", action="store_true", dest="usb_host",
|
||||
default=False, help="Compile the USB Host library")
|
||||
parser.add_option("-u", "--usb", action="store_true", dest="usb",
|
||||
default=False, help="Compile the USB Device library")
|
||||
parser.add_option("-d", "--dsp", action="store_true", dest="dsp",
|
||||
default=False, help="Compile the DSP library")
|
||||
parser.add_option("-f", "--fat", action="store_true", dest="fat",
|
||||
default=False, help="Compile FS ad SD card file system library")
|
||||
parser.add_option("-b", "--ublox", action="store_true", dest="ublox",
|
||||
default=False, help="Compile the u-blox library")
|
||||
parser.add_option("-D", "", action="append", dest="macros",
|
||||
parser.add_option("-r", "--rtos",
|
||||
action="store_true",
|
||||
dest="rtos",
|
||||
default=False,
|
||||
help="Compile the rtos")
|
||||
|
||||
parser.add_option("-e", "--eth",
|
||||
action="store_true", dest="eth",
|
||||
default=False,
|
||||
help="Compile the ethernet library")
|
||||
|
||||
parser.add_option("-U", "--usb_host",
|
||||
action="store_true",
|
||||
dest="usb_host",
|
||||
default=False,
|
||||
help="Compile the USB Host library")
|
||||
|
||||
parser.add_option("-u", "--usb",
|
||||
action="store_true",
|
||||
dest="usb",
|
||||
default=False,
|
||||
help="Compile the USB Device library")
|
||||
|
||||
parser.add_option("-d", "--dsp",
|
||||
action="store_true",
|
||||
dest="dsp",
|
||||
default=False,
|
||||
help="Compile the DSP library")
|
||||
|
||||
parser.add_option("-f", "--fat",
|
||||
action="store_true",
|
||||
dest="fat",
|
||||
default=False,
|
||||
help="Compile FS ad SD card file system library")
|
||||
|
||||
parser.add_option("-b", "--ublox",
|
||||
action="store_true",
|
||||
dest="ublox",
|
||||
default=False,
|
||||
help="Compile the u-blox library")
|
||||
|
||||
parser.add_option("-D", "",
|
||||
action="append",
|
||||
dest="macros",
|
||||
help="Add a macro definition")
|
||||
parser.add_option("-S", "--supported-toolchains", action="store_true", dest="supported_toolchains",
|
||||
default=False, help="Displays supported matrix of MCUs and toolchains")
|
||||
parser.add_option("", "--cppcheck", action="store_true", dest="cppcheck_validation",
|
||||
default=False, help="Forces 'cppcheck' static code analysis")
|
||||
parser.add_option("-v", "--verbose", action="store_true", dest="verbose",
|
||||
default=False, help="Verbose diagnostic output")
|
||||
parser.add_option("-x", "--extra-verbose-notifications", action="store_true", dest="extra_verbose_notify",
|
||||
default=False, help="Makes compiler more verbose, CI friendly.")
|
||||
|
||||
parser.add_option("-S", "--supported-toolchains",
|
||||
action="store_true",
|
||||
dest="supported_toolchains",
|
||||
default=False,
|
||||
help="Displays supported matrix of MCUs and toolchains")
|
||||
|
||||
parser.add_option("", "--cppcheck",
|
||||
action="store_true",
|
||||
dest="cppcheck_validation",
|
||||
default=False,
|
||||
help="Forces 'cppcheck' static code analysis")
|
||||
|
||||
parser.add_option("-v", "--verbose",
|
||||
action="store_true",
|
||||
dest="verbose",
|
||||
default=False,
|
||||
help="Verbose diagnostic output")
|
||||
|
||||
parser.add_option("-x", "--extra-verbose-notifications",
|
||||
action="store_true",
|
||||
dest="extra_verbose_notify",
|
||||
default=False,
|
||||
help="Makes compiler more verbose, CI friendly.")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
# Only prints matrix of supported toolchains
|
||||
|
@ -177,9 +223,9 @@ if __name__ == '__main__':
|
|||
print "Completed in: (%.2f)s" % (time() - start)
|
||||
print
|
||||
|
||||
print print_build_results(successes, "Build successes:")
|
||||
print print_build_results(skipped, "Build skipped:")
|
||||
print print_build_results(failures, "Build failures:")
|
||||
print print_build_results(successes, "Build successes:"),
|
||||
print print_build_results(skipped, "Build skipped:"),
|
||||
print print_build_results(failures, "Build failures:"),
|
||||
|
||||
if failures:
|
||||
sys.exit(1)
|
||||
|
|
|
@ -161,7 +161,7 @@ def build_lib(lib_id, target, toolchain, options=None, verbose=False, clean=Fals
|
|||
lib.dependencies, options,
|
||||
verbose=verbose, clean=clean, macros=MACROS, notify=notify, inc_dirs=lib.inc_dirs)
|
||||
else:
|
||||
print '\n\nLibrary "%s" is not yet supported on target %s with toolchain %s' % (lib_id, target.name, toolchain)
|
||||
print 'Library "%s" is not yet supported on target %s with toolchain %s' % (lib_id, target.name, toolchain)
|
||||
|
||||
|
||||
# We do have unique legacy conventions about how we build and package the mbed library
|
||||
|
@ -489,4 +489,5 @@ def print_build_results(result_list, build_name):
|
|||
if result_list:
|
||||
result += build_name + "\n"
|
||||
result += "\n".join([" * %s" % f for f in result_list])
|
||||
result += "\n"
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue