1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 22 unchanged lines hidden (view full) --- 31import os 32import socket 33import sys 34 35__all__ = [ 'options', 'arguments', 'main' ] 36 37usage="%prog [gem5 options] script.py [script options]" 38version="%prog 2.0" |
39brief_copyright=\ 40 "gem5 is copyrighted software; use the --copyright option for details." |
41 42def parse_options(): 43 import config 44 from options import OptionParser 45 46 options = OptionParser(usage=usage, version=version, 47 description=brief_copyright) 48 option = options.add_option 49 group = options.set_group 50 51 # Help options |
52 option('-B', "--build-info", action="store_true", default=False, 53 help="Show build information") 54 option('-C', "--copyright", action="store_true", default=False, 55 help="Show full copyright information") 56 option('-R', "--readme", action="store_true", default=False, 57 help="Show the readme") 58 59 # Options for configuring the base simulator --- 141 unchanged lines hidden (view full) --- 201 keys.sort() 202 for key in keys: 203 val = defines.buildEnv[key] 204 print ' %s = %s' % (key, val) 205 print 206 207 if options.copyright: 208 done = True |
209 print info.COPYING |
210 print 211 |
212 if options.readme: 213 done = True 214 print 'Readme:' 215 print 216 print info.README 217 print 218 219 if options.debug_help: --- 26 unchanged lines hidden (view full) --- 246 sys.exit(0) 247 248 # setting verbose and quiet at the same time doesn't make sense 249 if options.verbose > 0 and options.quiet > 0: 250 options.usage(2) 251 252 verbose = options.verbose - options.quiet 253 if options.verbose >= 0: |
254 print "gem5 Simulator System. http://gem5.org" |
255 print brief_copyright 256 print 257 258 print "gem5 compiled %s" % defines.compileDate; 259 260 print "gem5 started %s" % \ 261 datetime.datetime.now().strftime("%b %e %Y %X") 262 print "gem5 executing on %s" % socket.gethostname() --- 110 unchanged lines hidden --- |