summaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-02-04 12:41:01 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:18:30 -0400
commit139c1837db7eaee53e1c441629b5bcc159e1deb0 (patch)
treec677e659b182e1a5df1d7a928c7a7e1afb921b3a /accel
parent243af0225ab37c642d73e4002b233af728119f72 (diff)
downloadqemu-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 'accel')
-rw-r--r--accel/tcg/atomic_common.c.inc (renamed from accel/tcg/atomic_common.inc.c)0
-rw-r--r--accel/tcg/cputlb.c2
-rw-r--r--accel/tcg/user-exec.c2
3 files changed, 2 insertions, 2 deletions
diff --git a/accel/tcg/atomic_common.inc.c b/accel/tcg/atomic_common.c.inc
index 344525b0bb..344525b0bb 100644
--- a/accel/tcg/atomic_common.inc.c
+++ b/accel/tcg/atomic_common.c.inc
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 5349ee6b0e..2d48281942 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -2354,7 +2354,7 @@ void cpu_stq_le_data(CPUArchState *env, target_ulong ptr, uint64_t val)
#define ATOMIC_MMU_CLEANUP
#define ATOMIC_MMU_IDX get_mmuidx(oi)
-#include "atomic_common.inc.c"
+#include "atomic_common.c.inc"
#define DATA_SIZE 1
#include "atomic_template.h"
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 1d34c57ff5..bb039eb32d 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -1189,7 +1189,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
#define ATOMIC_NAME(X) HELPER(glue(glue(atomic_ ## X, SUFFIX), END))
#define EXTRA_ARGS
-#include "atomic_common.inc.c"
+#include "atomic_common.c.inc"
#define DATA_SIZE 1
#include "atomic_template.h"