summaryrefslogtreecommitdiffstats
path: root/freebsd-to-rtems.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-05-31 09:49:31 +1000
committerChris Johns <chrisj@rtems.org>2016-05-31 09:49:31 +1000
commitf9798adc4db47422f7b4ddab4816181411d02234 (patch)
tree9a4e1ba969d1f643452ce8d2f58ed8f3e6fde092 /freebsd-to-rtems.py
parentrtems-bsd-mutex: Update due to API changes (diff)
downloadrtems-libbsd-f9798adc4db47422f7b4ddab4816181411d02234.tar.bz2
Add a stats report command.
The report shows the level of changes we have made to the FreeBSD code.
Diffstat (limited to 'freebsd-to-rtems.py')
-rwxr-xr-xfreebsd-to-rtems.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index df7bbcaf..f9107c24 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -48,6 +48,7 @@ import libbsd
isForward = True
isEarlyExit = False
isOnlyBuildScripts = False
+statsReport = False
def usage():
print("freebsd-to-rtems.py [args]")
@@ -57,6 +58,7 @@ def usage():
print(" -e|--early-exit evaluate arguments, print results, and exit")
print(" -m|--makefile Warning: depreciated and will be removed ")
print(" -b|--buildscripts just generate the build scripts")
+ print(" -S|--stats Print a statistics report")
print(" -R|--reverse default FreeBSD -> RTEMS, reverse that")
print(" -r|--rtems RTEMS Libbsd directory (default: '.')")
print(" -f|--freebsd FreeBSD SVN directory (default: 'freebsd-org')")
@@ -64,11 +66,11 @@ def usage():
# Parse the arguments
def parseArguments():
- global isForward, isEarlyExit
+ global isForward, isEarlyExit, statsReport
global isOnlyBuildScripts
try:
opts, args = getopt.getopt(sys.argv[1:],
- "?hdDembRr:f:v",
+ "?hdDembSRr:f:v",
[ "help",
"help",
"dry-run"
@@ -77,6 +79,7 @@ def parseArguments():
"makefile"
"buildscripts"
"reverse"
+ "stats"
"rtems="
"freebsd="
"verbose" ])
@@ -99,6 +102,8 @@ def parseArguments():
isEarlyExit = True
elif o in ("-b", "--buildscripts") or o in ("-m", "--makefile"):
isOnlyBuildScripts = True
+ elif o in ("-S", "--stats"):
+ statsReport = True
elif o in ("-R", "--reverse"):
isForward = False
elif o in ("-r", "--rtems"):
@@ -152,7 +157,7 @@ try:
if not isOnlyBuildScripts:
wafGen.processSource(isForward)
wafGen.generate(libbsd.rtems_version())
- builder.changedFileSummary()
+ builder.changedFileSummary(statsReport)
except IOError as ioe:
print('error: %s' % (str(ioe)))
except builder.error as be: