mirror of https://github.com/ARMmbed/mbed-os.git
standardize on nargs="*"
parent
3276854f49
commit
7e5deaa7d0
|
@ -44,7 +44,7 @@ if __name__ == '__main__':
|
||||||
parser = get_default_options_parser()
|
parser = get_default_options_parser()
|
||||||
|
|
||||||
parser.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
|
parser.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
|
||||||
default=None, help="The source (input) directory", action="append")
|
default=None, help="The source (input) directory", nargs="*")
|
||||||
|
|
||||||
parser.add_argument("--build", dest="build_dir", type=argparse_filestring_type,
|
parser.add_argument("--build", dest="build_dir", type=argparse_filestring_type,
|
||||||
default=None, help="The build (output) directory")
|
default=None, help="The build (output) directory")
|
||||||
|
@ -107,7 +107,7 @@ if __name__ == '__main__':
|
||||||
help="Compiles 'cpputest' unit test library (library should be on the same directory level as mbed repository)")
|
help="Compiles 'cpputest' unit test library (library should be on the same directory level as mbed repository)")
|
||||||
|
|
||||||
parser.add_argument("-D",
|
parser.add_argument("-D",
|
||||||
action="append",
|
nargs="*",
|
||||||
dest="macros",
|
dest="macros",
|
||||||
help="Add a macro definition")
|
help="Add a macro definition")
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,8 @@ if __name__ == '__main__':
|
||||||
# Parse Options
|
# Parse Options
|
||||||
parser = get_default_options_parser(add_clean=False, add_options=False)
|
parser = get_default_options_parser(add_clean=False, add_options=False)
|
||||||
parser.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
|
parser.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
|
||||||
default=[], help="The source (input) directory", action="append")
|
default=[], help="The source (input) directory", nargs="*")
|
||||||
parser.add_argument("--prefix", dest="prefix", action="append",
|
parser.add_argument("--prefix", dest="prefix", nargs="*",
|
||||||
default=[], help="Restrict listing to parameters that have this prefix")
|
default=[], help="Restrict listing to parameters that have this prefix")
|
||||||
parser.add_argument("-v", "--verbose", action="store_true", dest="verbose",
|
parser.add_argument("-v", "--verbose", action="store_true", dest="verbose",
|
||||||
default=False, help="Verbose diagnostic output")
|
default=False, help="Verbose diagnostic output")
|
||||||
|
|
|
@ -79,7 +79,7 @@ if __name__ == '__main__':
|
||||||
help="Silent diagnostic output (no copy, compile notification)")
|
help="Silent diagnostic output (no copy, compile notification)")
|
||||||
|
|
||||||
parser.add_argument("-D",
|
parser.add_argument("-D",
|
||||||
action="append",
|
nargs="*",
|
||||||
dest="macros",
|
dest="macros",
|
||||||
help="Add a macro definition")
|
help="Add a macro definition")
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ if __name__ == '__main__':
|
||||||
parser.add_argument("--dep", dest="dependencies",
|
parser.add_argument("--dep", dest="dependencies",
|
||||||
default=None, help="Dependencies")
|
default=None, help="Dependencies")
|
||||||
group.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
|
group.add_argument("--source", dest="source_dir", type=argparse_filestring_type,
|
||||||
default=None, help="The source (input) directory", action="append")
|
default=None, help="The source (input) directory", nargs="*")
|
||||||
parser.add_argument("--duration", type=int, dest="duration",
|
parser.add_argument("--duration", type=int, dest="duration",
|
||||||
default=None, help="Duration of the test")
|
default=None, help="Duration of the test")
|
||||||
parser.add_argument("--build", dest="build_dir",
|
parser.add_argument("--build", dest="build_dir",
|
||||||
|
|
|
@ -43,7 +43,7 @@ def get_default_options_parser(add_clean=True, add_options=True):
|
||||||
help="clean the build directory")
|
help="clean the build directory")
|
||||||
|
|
||||||
if add_options:
|
if add_options:
|
||||||
parser.add_argument("-o", "--options", action="append",
|
parser.add_argument("-o", "--options", nargs="*",
|
||||||
help='Add a build argument ("save-asm": save the asm generated by the compiler, "debug-info": generate debugging information, "analyze": run Goanna static code analyzer")',
|
help='Add a build argument ("save-asm": save the asm generated by the compiler, "debug-info": generate debugging information, "analyze": run Goanna static code analyzer")',
|
||||||
type=argparse_lowercase_hyphen_type(['save-asm', 'debug-info', 'analyze'], "build option"))
|
type=argparse_lowercase_hyphen_type(['save-asm', 'debug-info', 'analyze'], "build option"))
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ if __name__ == '__main__':
|
||||||
help="The source (input) directory")
|
help="The source (input) directory")
|
||||||
|
|
||||||
parser.add_argument("-D",
|
parser.add_argument("-D",
|
||||||
action="append",
|
nargs="*",
|
||||||
dest="macros",
|
dest="macros",
|
||||||
help="Add a macro definition")
|
help="Add a macro definition")
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ if __name__ == '__main__':
|
||||||
parser = get_default_options_parser()
|
parser = get_default_options_parser()
|
||||||
|
|
||||||
parser.add_argument("-D",
|
parser.add_argument("-D",
|
||||||
action="append",
|
nargs="*",
|
||||||
dest="macros",
|
dest="macros",
|
||||||
help="Add a macro definition")
|
help="Add a macro definition")
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
parser.add_argument("--source", dest="source_dir",
|
parser.add_argument("--source", dest="source_dir",
|
||||||
type=argparse_filestring_type,
|
type=argparse_filestring_type,
|
||||||
default=None, help="The source (input) directory (for sources other than tests). Defaults to current directory.", action="append")
|
default=None, help="The source (input) directory (for sources other than tests). Defaults to current directory.", nargs="*")
|
||||||
|
|
||||||
parser.add_argument("--build", dest="build_dir",
|
parser.add_argument("--build", dest="build_dir",
|
||||||
default=None, help="The build (output) directory")
|
default=None, help="The build (output) directory")
|
||||||
|
|
Loading…
Reference in New Issue