Deleted Added
sdiff udiff text old ( 8878:ac6eb417e7b4 ) new ( 8879:347fc850752c )
full compact
1# -*- mode:python -*-
2
3# Copyright (c) 2011 Advanced Micro Devices, Inc.
4# Copyright (c) 2009 The Hewlett-Packard Development Company
5# Copyright (c) 2004-2005 The Regents of The University of Michigan
6# All rights reserved.
7#
8# Redistribution and use in source and binary forms, with or without

--- 115 unchanged lines hidden (view full) ---

124help_texts = {
125 "options" : "",
126 "global_vars" : "",
127 "local_vars" : ""
128}
129
130Export("help_texts")
131
132def AddM5Option(*args, **kwargs):
133 col_width = 30
134
135 help = " " + ", ".join(args)
136 if "help" in kwargs:
137 length = len(help)
138 if length >= col_width:
139 help += "\n" + " " * col_width
140 else:
141 help += " " * (col_width - length)
142 help += kwargs["help"]
143 help_texts["options"] += help + "\n"
144
145 AddOption(*args, **kwargs)
146
147AddM5Option('--colors', dest='use_colors', action='store_true',
148 help="Add color to abbreviated scons output")
149AddM5Option('--no-colors', dest='use_colors', action='store_false',
150 help="Don't add color to abbreviated scons output")
151AddM5Option('--default', dest='default', type='string', action='store',
152 help='Override which build_opts file to use for defaults')
153AddM5Option('--ignore-style', dest='ignore_style', action='store_true',
154 help='Disable style checking hooks')
155AddM5Option('--update-ref', dest='update_ref', action='store_true',
156 help='Update test reference outputs')
157AddM5Option('--verbose', dest='verbose', action='store_true',
158 help='Print full tool command lines')
159
160use_colors = GetOption('use_colors')
161if use_colors:
162 from m5.util.terminal import termcap
163elif use_colors is None:
164 # option unspecified; default behavior is to use colors iff isatty
165 from m5.util.terminal import tty_termcap as termcap
166else:

--- 861 unchanged lines hidden ---