diff options
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | deheader | 17 | ||||
-rw-r--r-- | deheader.xml | 4 |
3 files changed, 17 insertions, 7 deletions
@@ -1,5 +1,8 @@ deheader project news +1.0 @ + Added --quiet option. + 0.8 @ 2013-09-14 Minor documentation fixes. @@ -2,10 +2,11 @@ """\ deheader -- find (optionally remove) unneeded includes in C or C++ sourcefiles. -Usage: deheader [-h] [-v] [-r] [-i pattern] [-x pattern] [sourcefiles] +Usage: deheader [-h] [-i pattern] [-m cmd] [-q] [-r] [-x pattern] [-v] [file...] -h, --help Emit this help message and quit. - -m, --maker Set the build command (by default "make") + -m, --maker Set the build command (by default 'make') -i, --ignore Ignore (don't remove) headers matching the argument regexp + -q, --quiet Suppress statistical summary -r, --remove Remove the final set of unneeded headers -v, --verbose Be chatty about what you're doing. -x, --exclude Exclude files matching regexp @@ -1454,6 +1455,7 @@ if __name__ == "__main__": "remove", "verbose",]) maker = "make" verbose = 0 + quiet = False remove = False ignores = [] exclusions = [] @@ -1465,6 +1467,8 @@ if __name__ == "__main__": ignores.append(val) elif switch in ('-m', '--maker'): maker = val + elif switch in ('-q', '--quiet'): + quiet = True elif switch in ('-r', '--remove'): remove = True elif switch in ('-v', '--verbose'): @@ -1492,10 +1496,11 @@ if __name__ == "__main__": inclusion_map.depends_on[sourcefile], inclusion_map.requires[sourcefile], remove, verbose)) - stats = Summary() - for summary in summaries: - stats = stats + summary - print "deheader: saw", stats + if not quiet: + stats = Summary() + for summary in summaries: + stats = stats + summary + print "deheader: saw", stats raise SystemExit, 0 # End diff --git a/deheader.xml b/deheader.xml index 60a2b79..0198d14 100644 --- a/deheader.xml +++ b/deheader.xml @@ -22,6 +22,7 @@ <arg choice='opt'>-h </arg> <arg choice='opt'>-m <replaceable>command</replaceable></arg> <arg choice='opt'>-i <replaceable>pattern</replaceable></arg> + <arg choice='opt'>-q </arg> <arg choice='opt'>-r </arg> <arg choice='opt'>-v </arg> <arg choice='opt'>-x <replaceable>pattern</replaceable></arg> @@ -82,7 +83,8 @@ indicated with a twirling-baton prompt. At verbosity level 2, you get vebose progress messages on the analysis. At verbosity level 3, you see the output from the make and compilation commands.</para> -<para>The last line of the output will be a statistical summary.</para> +<para>If the -q (--quiet) option flag was not set, the last line of the +output will be a statistical summary.</para> <para>Running deheader will leave a lot of binaries in your directory that were compiled in ways possibly not invoked by your normal build |