-AddOption('--colors', dest='use_colors', action='store_true')
-AddOption('--no-colors', dest='use_colors', action='store_false')
-use_colors = GetOption('use_colors')
+help_texts = {
+ "options" : "",
+ "global_vars" : "",
+ "local_vars" : ""
+}
+
+Export("help_texts")
+
+def AddM5Option(*args, **kwargs):
+ col_width = 30
+
+ help = " " + ", ".join(args)
+ if "help" in kwargs:
+ length = len(help)
+ if length >= col_width:
+ help += "\n" + " " * col_width
+ else:
+ help += " " * (col_width - length)
+ help += kwargs["help"]
+ help_texts["options"] += help + "\n"
+
+ AddOption(*args, **kwargs)
+
+AddM5Option('--colors', dest='use_colors', action='store_true',
+ help="Add color to abbreviated scons output")
+AddM5Option('--no-colors', dest='use_colors', action='store_false',
+ help="Don't add color to abbreviated scons output")
+AddM5Option('--default', dest='default', type='string', action='store',
+ help='Override which build_opts file to use for defaults')
+AddM5Option('--ignore-style', dest='ignore_style', action='store_true',
+ help='Disable style checking hooks')
+AddM5Option('--update-ref', dest='update_ref', action='store_true',
+ help='Update test reference outputs')
+AddM5Option('--verbose', dest='verbose', action='store_true',
+ help='Print full tool command lines')