Changeset f9798ad in rtems-libbsd for freebsd-to-rtems.py


Ignore:
Timestamp:
May 30, 2016, 11:49:31 PM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, 4a77611a223ea883fb548679b516d326a020d447
Children:
ab5cd63
Parents:
70d52b8
Message:

Add a stats report command.

The report shows the level of changes we have made to the FreeBSD code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd-to-rtems.py

    r70d52b8 rf9798ad  
    4949isEarlyExit = False
    5050isOnlyBuildScripts = False
     51statsReport = False
    5152
    5253def usage():
     
    5859    print("  -m|--makefile     Warning: depreciated and will be removed ")
    5960    print("  -b|--buildscripts just generate the build scripts")
     61    print("  -S|--stats        Print a statistics report")
    6062    print("  -R|--reverse      default FreeBSD -> RTEMS, reverse that")
    6163    print("  -r|--rtems        RTEMS Libbsd directory (default: '.')")
     
    6567# Parse the arguments
    6668def parseArguments():
    67     global isForward, isEarlyExit
     69    global isForward, isEarlyExit, statsReport
    6870    global isOnlyBuildScripts
    6971    try:
    7072        opts, args = getopt.getopt(sys.argv[1:],
    71                                    "?hdDembRr:f:v",
     73                                   "?hdDembSRr:f:v",
    7274                                   [ "help",
    7375                                     "help",
     
    7880                                     "buildscripts"
    7981                                     "reverse"
     82                                     "stats"
    8083                                     "rtems="
    8184                                     "freebsd="
     
    100103        elif o in ("-b", "--buildscripts") or o in ("-m", "--makefile"):
    101104            isOnlyBuildScripts = True
     105        elif o in ("-S", "--stats"):
     106            statsReport = True
    102107        elif o in ("-R", "--reverse"):
    103108            isForward = False
     
    153158        wafGen.processSource(isForward)
    154159    wafGen.generate(libbsd.rtems_version())
    155     builder.changedFileSummary()
     160    builder.changedFileSummary(statsReport)
    156161except IOError as ioe:
    157162    print('error: %s' % (str(ioe)))
Note: See TracChangeset for help on using the changeset viewer.