scripts/clean-includes: Enhance to handle header files
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Feb 2016 11:58:02 +0000 (11:58 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Feb 2016 12:43:05 +0000 (12:43 +0000)
commitfd3e39a40ca2ee26b09a5de3149af8b056b85233
treec8eb224e292f05141699a91ce45e76173c253da8
parente78490c44ccd90507750a563493bad6d27e3693a
scripts/clean-includes: Enhance to handle header files

Enhance clean-includes to handle header files as well as .c source
files. For headers we merely remove all the redundant #include
lines, including any includes of qemu/osdep.h itself.

There is a simple mollyguard on the include file processing to
skip a few key headers like osdep.h itself, to avoid producing
bad patches if the script is run on every file in include/.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
scripts/clean-includes