diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-02-04 12:41:01 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-21 06:18:30 -0400 |
commit | 139c1837db7eaee53e1c441629b5bcc159e1deb0 (patch) | |
tree | c677e659b182e1a5df1d7a928c7a7e1afb921b3a /target/xtensa | |
parent | 243af0225ab37c642d73e4002b233af728119f72 (diff) |
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/xtensa')
-rw-r--r-- | target/xtensa/core-dc232b.c | 4 | ||||
-rw-r--r-- | target/xtensa/core-dc232b/gdb-config.c.inc (renamed from target/xtensa/core-dc232b/gdb-config.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-dc232b/xtensa-modules.c.inc (renamed from target/xtensa/core-dc232b/xtensa-modules.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-dc233c.c | 4 | ||||
-rw-r--r-- | target/xtensa/core-dc233c/gdb-config.c.inc (renamed from target/xtensa/core-dc233c/gdb-config.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-dc233c/xtensa-modules.c.inc (renamed from target/xtensa/core-dc233c/xtensa-modules.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-de212.c | 4 | ||||
-rw-r--r-- | target/xtensa/core-de212/gdb-config.c.inc (renamed from target/xtensa/core-de212/gdb-config.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-de212/xtensa-modules.c.inc (renamed from target/xtensa/core-de212/xtensa-modules.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-fsf.c | 2 | ||||
-rw-r--r-- | target/xtensa/core-fsf/xtensa-modules.c.inc (renamed from target/xtensa/core-fsf/xtensa-modules.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-sample_controller.c | 4 | ||||
-rw-r--r-- | target/xtensa/core-sample_controller/gdb-config.c.inc (renamed from target/xtensa/core-sample_controller/gdb-config.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-sample_controller/xtensa-modules.c.inc (renamed from target/xtensa/core-sample_controller/xtensa-modules.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-test_kc705_be.c | 4 | ||||
-rw-r--r-- | target/xtensa/core-test_kc705_be/gdb-config.c.inc (renamed from target/xtensa/core-test_kc705_be/gdb-config.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-test_kc705_be/xtensa-modules.c.inc (renamed from target/xtensa/core-test_kc705_be/xtensa-modules.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-test_mmuhifi_c3.c | 4 | ||||
-rw-r--r-- | target/xtensa/core-test_mmuhifi_c3/gdb-config.c.inc (renamed from target/xtensa/core-test_mmuhifi_c3/gdb-config.inc.c) | 0 | ||||
-rw-r--r-- | target/xtensa/core-test_mmuhifi_c3/xtensa-modules.c.inc (renamed from target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c) | 0 | ||||
-rwxr-xr-x | target/xtensa/import_core.sh | 8 |
21 files changed, 17 insertions, 17 deletions
diff --git a/target/xtensa/core-dc232b.c b/target/xtensa/core-dc232b.c index 7851bcb636..c982d09c24 100644 --- a/target/xtensa/core-dc232b.c +++ b/target/xtensa/core-dc232b.c @@ -35,13 +35,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_dc232b -#include "core-dc232b/xtensa-modules.inc.c" +#include "core-dc232b/xtensa-modules.c.inc" static XtensaConfig dc232b __attribute__((unused)) = { .name = "dc232b", .gdb_regmap = { .reg = { -#include "core-dc232b/gdb-config.inc.c" +#include "core-dc232b/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-dc232b/gdb-config.inc.c b/target/xtensa/core-dc232b/gdb-config.c.inc index d87168628b..d87168628b 100644 --- a/target/xtensa/core-dc232b/gdb-config.inc.c +++ b/target/xtensa/core-dc232b/gdb-config.c.inc diff --git a/target/xtensa/core-dc232b/xtensa-modules.inc.c b/target/xtensa/core-dc232b/xtensa-modules.c.inc index 164df3b1a4..164df3b1a4 100644 --- a/target/xtensa/core-dc232b/xtensa-modules.inc.c +++ b/target/xtensa/core-dc232b/xtensa-modules.c.inc diff --git a/target/xtensa/core-dc233c.c b/target/xtensa/core-dc233c.c index f8204f7045..595ab9a90f 100644 --- a/target/xtensa/core-dc233c.c +++ b/target/xtensa/core-dc233c.c @@ -34,13 +34,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_dc233c -#include "core-dc233c/xtensa-modules.inc.c" +#include "core-dc233c/xtensa-modules.c.inc" static XtensaConfig dc233c __attribute__((unused)) = { .name = "dc233c", .gdb_regmap = { .reg = { -#include "core-dc233c/gdb-config.inc.c" +#include "core-dc233c/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-dc233c/gdb-config.inc.c b/target/xtensa/core-dc233c/gdb-config.c.inc index 7e8963227f..7e8963227f 100644 --- a/target/xtensa/core-dc233c/gdb-config.inc.c +++ b/target/xtensa/core-dc233c/gdb-config.c.inc diff --git a/target/xtensa/core-dc233c/xtensa-modules.inc.c b/target/xtensa/core-dc233c/xtensa-modules.c.inc index 0f32f0804a..0f32f0804a 100644 --- a/target/xtensa/core-dc233c/xtensa-modules.inc.c +++ b/target/xtensa/core-dc233c/xtensa-modules.c.inc diff --git a/target/xtensa/core-de212.c b/target/xtensa/core-de212.c index a061158f6e..50c995ba79 100644 --- a/target/xtensa/core-de212.c +++ b/target/xtensa/core-de212.c @@ -34,13 +34,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_de212 -#include "core-de212/xtensa-modules.inc.c" +#include "core-de212/xtensa-modules.c.inc" static XtensaConfig de212 __attribute__((unused)) = { .name = "de212", .gdb_regmap = { .reg = { -#include "core-de212/gdb-config.inc.c" +#include "core-de212/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-de212/gdb-config.inc.c b/target/xtensa/core-de212/gdb-config.c.inc index 25510fc34c..25510fc34c 100644 --- a/target/xtensa/core-de212/gdb-config.inc.c +++ b/target/xtensa/core-de212/gdb-config.c.inc diff --git a/target/xtensa/core-de212/xtensa-modules.inc.c b/target/xtensa/core-de212/xtensa-modules.c.inc index 480c68d3c6..480c68d3c6 100644 --- a/target/xtensa/core-de212/xtensa-modules.inc.c +++ b/target/xtensa/core-de212/xtensa-modules.c.inc diff --git a/target/xtensa/core-fsf.c b/target/xtensa/core-fsf.c index 1221a296fa..3327c50b4f 100644 --- a/target/xtensa/core-fsf.c +++ b/target/xtensa/core-fsf.c @@ -34,7 +34,7 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_fsf -#include "core-fsf/xtensa-modules.inc.c" +#include "core-fsf/xtensa-modules.c.inc" static XtensaConfig fsf __attribute__((unused)) = { .name = "fsf", diff --git a/target/xtensa/core-fsf/xtensa-modules.inc.c b/target/xtensa/core-fsf/xtensa-modules.c.inc index c32683ff77..c32683ff77 100644 --- a/target/xtensa/core-fsf/xtensa-modules.inc.c +++ b/target/xtensa/core-fsf/xtensa-modules.c.inc diff --git a/target/xtensa/core-sample_controller.c b/target/xtensa/core-sample_controller.c index a1d220bb9a..fd5de5576b 100644 --- a/target/xtensa/core-sample_controller.c +++ b/target/xtensa/core-sample_controller.c @@ -34,13 +34,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_sample_controller -#include "core-sample_controller/xtensa-modules.inc.c" +#include "core-sample_controller/xtensa-modules.c.inc" static XtensaConfig sample_controller __attribute__((unused)) = { .name = "sample_controller", .gdb_regmap = { .reg = { -#include "core-sample_controller/gdb-config.inc.c" +#include "core-sample_controller/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-sample_controller/gdb-config.inc.c b/target/xtensa/core-sample_controller/gdb-config.c.inc index 99e172d819..99e172d819 100644 --- a/target/xtensa/core-sample_controller/gdb-config.inc.c +++ b/target/xtensa/core-sample_controller/gdb-config.c.inc diff --git a/target/xtensa/core-sample_controller/xtensa-modules.inc.c b/target/xtensa/core-sample_controller/xtensa-modules.c.inc index 7e87d216bd..7e87d216bd 100644 --- a/target/xtensa/core-sample_controller/xtensa-modules.inc.c +++ b/target/xtensa/core-sample_controller/xtensa-modules.c.inc diff --git a/target/xtensa/core-test_kc705_be.c b/target/xtensa/core-test_kc705_be.c index ab73c3885f..294c16f2f4 100644 --- a/target/xtensa/core-test_kc705_be.c +++ b/target/xtensa/core-test_kc705_be.c @@ -34,13 +34,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_test_kc705_be -#include "core-test_kc705_be/xtensa-modules.inc.c" +#include "core-test_kc705_be/xtensa-modules.c.inc" static XtensaConfig test_kc705_be __attribute__((unused)) = { .name = "test_kc705_be", .gdb_regmap = { .reg = { -#include "core-test_kc705_be/gdb-config.inc.c" +#include "core-test_kc705_be/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-test_kc705_be/gdb-config.inc.c b/target/xtensa/core-test_kc705_be/gdb-config.c.inc index eb3e03cd52..eb3e03cd52 100644 --- a/target/xtensa/core-test_kc705_be/gdb-config.inc.c +++ b/target/xtensa/core-test_kc705_be/gdb-config.c.inc diff --git a/target/xtensa/core-test_kc705_be/xtensa-modules.inc.c b/target/xtensa/core-test_kc705_be/xtensa-modules.c.inc index bc7cf44828..bc7cf44828 100644 --- a/target/xtensa/core-test_kc705_be/xtensa-modules.inc.c +++ b/target/xtensa/core-test_kc705_be/xtensa-modules.c.inc diff --git a/target/xtensa/core-test_mmuhifi_c3.c b/target/xtensa/core-test_mmuhifi_c3.c index 089ed7da5d..123c630b0d 100644 --- a/target/xtensa/core-test_mmuhifi_c3.c +++ b/target/xtensa/core-test_mmuhifi_c3.c @@ -35,13 +35,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_test_mmuhifi_c3 -#include "core-test_mmuhifi_c3/xtensa-modules.inc.c" +#include "core-test_mmuhifi_c3/xtensa-modules.c.inc" static XtensaConfig test_mmuhifi_c3 __attribute__((unused)) = { .name = "test_mmuhifi_c3", .gdb_regmap = { .reg = { -#include "core-test_mmuhifi_c3/gdb-config.inc.c" +#include "core-test_mmuhifi_c3/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-test_mmuhifi_c3/gdb-config.inc.c b/target/xtensa/core-test_mmuhifi_c3/gdb-config.c.inc index 0bca70b5af..0bca70b5af 100644 --- a/target/xtensa/core-test_mmuhifi_c3/gdb-config.inc.c +++ b/target/xtensa/core-test_mmuhifi_c3/gdb-config.c.inc diff --git a/target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c b/target/xtensa/core-test_mmuhifi_c3/xtensa-modules.c.inc index 28561147fc..28561147fc 100644 --- a/target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c +++ b/target/xtensa/core-test_mmuhifi_c3/xtensa-modules.c.inc diff --git a/target/xtensa/import_core.sh b/target/xtensa/import_core.sh index 8f844cf9e2..c8626a8c02 100755 --- a/target/xtensa/import_core.sh +++ b/target/xtensa/import_core.sh @@ -23,7 +23,7 @@ tar -xf "$OVERLAY" -C "$TARGET" --strip-components=2 \ xtensa/config/core-isa.h \ xtensa/config/core-matmap.h tar -xf "$OVERLAY" -O gdb/xtensa-config.c | \ - sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.inc.c + sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.c.inc # # Fix up known issues in the xtensa-modules.c # @@ -35,7 +35,7 @@ tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \ -e '/^#include "ansidecl.h"/d' \ -e '/^Slot_[a-zA-Z0-9_]\+_decode (const xtensa_insnbuf insn)/,/^}/s/^ return 0;$/ return XTENSA_UNDEFINED;/' \ -e 's/#include <xtensa-isa.h>/#include "xtensa-isa.h"/' \ - > "$TARGET"/xtensa-modules.inc.c + > "$TARGET"/xtensa-modules.c.inc cat <<EOF > "${TARGET}.c" #include "qemu/osdep.h" @@ -49,13 +49,13 @@ cat <<EOF > "${TARGET}.c" #include "overlay_tool.h" #define xtensa_modules xtensa_modules_$NAME -#include "core-$NAME/xtensa-modules.inc.c" +#include "core-$NAME/xtensa-modules.c.inc" static XtensaConfig $NAME __attribute__((unused)) = { .name = "$NAME", .gdb_regmap = { .reg = { -#include "core-$NAME/gdb-config.inc.c" +#include "core-$NAME/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, |