diff options
author | Paolo Bonzini | 2020-02-04 12:41:01 +0100 |
---|---|---|
committer | Paolo Bonzini | 2020-08-21 12:18:30 +0200 |
commit | 139c1837db7eaee53e1c441629b5bcc159e1deb0 (patch) | |
tree | c677e659b182e1a5df1d7a928c7a7e1afb921b3a /target/hppa | |
parent | trace: switch position of headers to what Meson requires (diff) | |
download | qemu-139c1837db7eaee53e1c441629b5bcc159e1deb0.tar.gz qemu-139c1837db7eaee53e1c441629b5bcc159e1deb0.tar.xz qemu-139c1837db7eaee53e1c441629b5bcc159e1deb0.zip |
meson: rename included C source files to .c.inc
With Makefiles that have automatically generated dependencies, you
generated includes are set as dependencies of the Makefile, so that they
are built before everything else and they are available when first
building the .c files.
Alternatively you can use a fine-grained dependency, e.g.
target/arm/translate.o: target/arm/decode-neon-shared.inc.c
With Meson you have only one choice and it is a third option, namely
"build at the beginning of the corresponding target"; the way you
express it is to list the includes in the sources of that target.
The problem is that Meson decides if something is a source vs. a
generated include by looking at the extension: '.c', '.cc', '.m', '.C'
are sources, while everything else is considered an include---including
'.inc.c'.
Use '.c.inc' to avoid this, as it is consistent with our other convention
of using '.rst.inc' for included reStructuredText files. The editorconfig
file is adjusted.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/hppa')
-rw-r--r-- | target/hppa/Makefile.objs | 4 | ||||
-rw-r--r-- | target/hppa/translate.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/target/hppa/Makefile.objs b/target/hppa/Makefile.objs index 174f50a96c..190cbff197 100644 --- a/target/hppa/Makefile.objs +++ b/target/hppa/Makefile.objs @@ -4,8 +4,8 @@ obj-$(CONFIG_SOFTMMU) += machine.o DECODETREE = $(SRC_PATH)/scripts/decodetree.py -target/hppa/decode.inc.c: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE) +target/hppa/decode.c.inc: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@) -target/hppa/translate.o: target/hppa/decode.inc.c +target/hppa/translate.o: target/hppa/decode.c.inc diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 4bd22d4820..316f58562e 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -334,7 +334,7 @@ static int expand_shl11(DisasContext *ctx, int val) /* Include the auto-generated decoder. */ -#include "decode.inc.c" +#include "decode.c.inc" /* We are not using a goto_tb (for whatever reason), but have updated the iaq (for whatever reason), so don't do it again on exit. */ |