mirror of
https://github.com/qemu/qemu.git
synced 2026-05-18 19:54:09 +00:00
scripts/clean-includes: Do all our exclusions with REGEXFILE
We currently have two mechanisms for excluding files: * the REGEXFILE which excludes by regex * special cases in the "loop over each file" which make us skip the file Roll all the "skip this" cases into REGEXFILE, so we use a single mechanism for identifying which files to exclude. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260116124005.925382-5-peter.maydell@linaro.org
This commit is contained in:
@@ -104,6 +104,15 @@ grep -v '^#' >"$REGEXFILE" <<EOT
|
||||
^ebpf/rss.bpf.skeleton.h
|
||||
# These files just include some other .c file and have no content themselves
|
||||
^linux-user/(mips64|x86_64)/(cpu_loop|signal).c
|
||||
# These are autogenerated headers
|
||||
^include/standard-headers/
|
||||
# osdep.h itself and its friends are expected to include system headers
|
||||
^include/qemu/osdep.h
|
||||
^include/qemu/compiler.h
|
||||
^include/glib-compat.h
|
||||
^include/system/os-(posix|win32).h
|
||||
# This is for use by plugins, which are standalone binaries
|
||||
^include/qemu/qemu-plugin.h
|
||||
EOT
|
||||
|
||||
# We assume there are no files in the tree with spaces in their name
|
||||
@@ -137,21 +146,6 @@ for f in "$@"; do
|
||||
*.c)
|
||||
MODE=c
|
||||
;;
|
||||
*include/qemu/osdep.h | \
|
||||
*include/qemu/compiler.h | \
|
||||
*include/qemu/qemu-plugin.h | \
|
||||
*include/glib-compat.h | \
|
||||
*include/system/os-posix.h | \
|
||||
*include/system/os-win32.h | \
|
||||
*include/standard-headers/ )
|
||||
# Removing include lines from osdep.h itself would be counterproductive.
|
||||
echo "SKIPPING $f (special case header)"
|
||||
continue
|
||||
;;
|
||||
*include/standard-headers/*)
|
||||
echo "SKIPPING $f (autogenerated header)"
|
||||
continue
|
||||
;;
|
||||
*.h)
|
||||
MODE=h
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user