[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/5] target: Bulk rename 'helper.h' -> 'helper.h.inc' for
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 5/5] target: Bulk rename 'helper.h' -> 'helper.h.inc' for all targets |
Date: |
Thu, 8 Jun 2023 15:34:27 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 |
On 8/6/23 15:31, Philippe Mathieu-Daudé wrote:
Since commit 139c1837db ("meson: rename included C source files
to .c.inc"), QEMU standard procedure for included C files is to
use *.c.inc.
Besides, since commit 6a0057aa22 ("docs/devel: make a statement
about includes") this is documented as the Coding Style:
If you do use template header files they should be named with
the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are
being included for expansion.
Therefore rename the included 'helper.h' as 'helper.h.inc' for
all targets (
Missing:
"moving the headers which are not in the 'tcg/' subdirectory there and"
updating the documentation).
Unfortunately since the HELPER_H path definition is used by all
targets, we have to do all changes in a single bulk commit.
Mechanical change doing:
$ for t_a in target/*; do \
if test -f ${t_a}/helper.h; then \
mkdir -p ${t_a}/tcg; \
git mv ${t_a}/helper.h ${t_a}/tcg/helper.h.inc; \
fi; \
done
$ sed -i \
-e 's#define HELPER_H "helper.h"#define HELPER_H "tcg/helper.h.inc"#' \
$(git grep -l 'define HELPER_H')
then manually updating files in include/exec/ and docs/.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/exec/helper-gen.h | 2 +-
include/exec/helper-proto.h | 2 +-
target/alpha/{helper.h => tcg/helper.h.inc} | 0
target/arm/{helper.h => tcg/helper.h.inc} | 0
target/avr/{helper.h => tcg/helper.h.inc} | 0
target/cris/{helper.h => tcg/helper.h.inc} | 0
target/hexagon/{helper.h => tcg/helper.h.inc} | 0
target/hppa/{helper.h => tcg/helper.h.inc} | 0
target/i386/{helper.h => tcg/helper.h.inc} | 0
target/loongarch/{helper.h => tcg/helper.h.inc} | 0
target/m68k/{helper.h => tcg/helper.h.inc} | 0
target/microblaze/{helper.h => tcg/helper.h.inc} | 0
target/mips/{helper.h => tcg/helper.h.inc} | 0
target/nios2/{helper.h => tcg/helper.h.inc} | 0
target/openrisc/{helper.h => tcg/helper.h.inc} | 0
target/ppc/{helper.h => tcg/helper.h.inc} | 0
target/riscv/{helper.h => tcg/helper.h.inc} | 0
target/rx/{helper.h => tcg/helper.h.inc} | 0
target/s390x/{helper.h => tcg/helper.h.inc} | 0
target/sh4/{helper.h => tcg/helper.h.inc} | 0
target/sparc/{helper.h => tcg/helper.h.inc} | 0
target/tricore/{helper.h => tcg/helper.h.inc} | 0
target/xtensa/{helper.h => tcg/helper.h.inc} | 0
target/alpha/translate.c | 2 +-
target/arm/tcg/translate.c | 2 +-
target/avr/translate.c | 2 +-
target/cris/translate.c | 2 +-
target/hexagon/translate.c | 2 +-
target/hppa/translate.c | 2 +-
target/i386/tcg/translate.c | 2 +-
target/loongarch/translate.c | 2 +-
target/m68k/translate.c | 2 +-
target/microblaze/translate.c | 2 +-
target/mips/tcg/translate.c | 2 +-
target/nios2/translate.c | 2 +-
target/openrisc/translate.c | 2 +-
target/ppc/translate.c | 2 +-
target/riscv/translate.c | 2 +-
target/rx/translate.c | 2 +-
target/s390x/tcg/translate.c | 2 +-
target/sh4/translate.c | 2 +-
target/sparc/translate.c | 2 +-
target/tricore/translate.c | 2 +-
target/xtensa/translate.c | 2 +-
44 files changed, 23 insertions(+), 23 deletions(-)
rename target/alpha/{helper.h => tcg/helper.h.inc} (100%)
rename target/arm/{helper.h => tcg/helper.h.inc} (100%)
rename target/avr/{helper.h => tcg/helper.h.inc} (100%)
rename target/cris/{helper.h => tcg/helper.h.inc} (100%)
rename target/hexagon/{helper.h => tcg/helper.h.inc} (100%)
rename target/hppa/{helper.h => tcg/helper.h.inc} (100%)
rename target/i386/{helper.h => tcg/helper.h.inc} (100%)
rename target/loongarch/{helper.h => tcg/helper.h.inc} (100%)
rename target/m68k/{helper.h => tcg/helper.h.inc} (100%)
rename target/microblaze/{helper.h => tcg/helper.h.inc} (100%)
rename target/mips/{helper.h => tcg/helper.h.inc} (100%)
rename target/nios2/{helper.h => tcg/helper.h.inc} (100%)
rename target/openrisc/{helper.h => tcg/helper.h.inc} (100%)
rename target/ppc/{helper.h => tcg/helper.h.inc} (100%)
rename target/riscv/{helper.h => tcg/helper.h.inc} (100%)
rename target/rx/{helper.h => tcg/helper.h.inc} (100%)
rename target/s390x/{helper.h => tcg/helper.h.inc} (100%)
rename target/sh4/{helper.h => tcg/helper.h.inc} (100%)
rename target/sparc/{helper.h => tcg/helper.h.inc} (100%)
rename target/tricore/{helper.h => tcg/helper.h.inc} (100%)
rename target/xtensa/{helper.h => tcg/helper.h.inc} (100%)
- [PATCH v2 0/5] misc: Enforce .[ch].inc extension for re-included .c/.h files, Philippe Mathieu-Daudé, 2023/06/08
- [PATCH v2 1/5] hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include, Philippe Mathieu-Daudé, 2023/06/08
- [PATCH v2 2/5] tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc, Philippe Mathieu-Daudé, 2023/06/08
- [PATCH v2 3/5] target/arm: Rename helper template headers as '.h.inc', Philippe Mathieu-Daudé, 2023/06/08
- [PATCH v2 4/5] target/i386: Rename helper template headers as '.h.inc', Philippe Mathieu-Daudé, 2023/06/08
- [PATCH v2 5/5] target: Bulk rename 'helper.h' -> 'helper.h.inc' for all targets, Philippe Mathieu-Daudé, 2023/06/08
- Re: [PATCH v2 5/5] target: Bulk rename 'helper.h' -> 'helper.h.inc' for all targets,
Philippe Mathieu-Daudé <=