From 1fe19461ff04be63a4641a5078b967160bccf944 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 1 Dec 2010 17:53:54 -0500 Subject: More tips on good usage. --- deheader.xml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/deheader.xml b/deheader.xml index 10ec5d8..9a9d7b4 100644 --- a/deheader.xml +++ b/deheader.xml @@ -37,6 +37,21 @@ returns a zero status (but the build command may be overridden). Optionally, with the switch, the unneeded headers are removed from the sourcefiles. +Inclusions within the scope of #if/#ifdef/#else/#endif +directives are left alone, because trying to reason about potential +combinations of -D and U options would be too complicated and prone to +weird errors. + +It is recommended that you arrange to compile with options that +will stop the compiler on warnings when using this tool; otherwise it +will be report headers that only declare prototypes and return types +(and thus throw only warnings) as being not required. Under gcc the +compiler options to accomplish this are -Werror -Wfatal-errors. If +your makefile follows normal conventions, running with -m +CFLAGS='-Werror -Wfatal-errors' may do the right thing; you +can check this by running with -v -v -v to see what compilation +commands are actually emitted. + If a sourcefile argument is a directory, the report is generated on all source files beneath it. Subdirectories beginning with a dot are assumed to be repository directories for version-control systems @@ -50,9 +65,13 @@ given and headers removed. At verbosity level 0, only messages indicating removable headers are issued. At verbosity 1, test compilations are timed and progess -indicated with a twirling-baton prompt. Higher levels enable more -detailed progress messages and are mainly useful for debugging this -program. +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. + +Running deheader will leave a lot of binaries in your directory that +were compiled in ways possibly not invoked by your normal build process. +Running "make clean" afterwards is strongly recommended. OPTIONS -- cgit v1.2.3-70-g09d2