aboutsummaryrefslogtreecommitdiff
path: root/Makefile
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 /Makefile
parent243af0225ab37c642d73e4002b233af728119f72 (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 'Makefile')
-rw-r--r--Makefile36
1 files changed, 18 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 00cadebf99..5596482dbd 100644
--- a/Makefile
+++ b/Makefile
@@ -289,28 +289,28 @@ KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
KEYCODEMAP_FILES = \
- ui/input-keymap-atset1-to-qcode.c \
- ui/input-keymap-linux-to-qcode.c \
- ui/input-keymap-qcode-to-atset1.c \
- ui/input-keymap-qcode-to-atset2.c \
- ui/input-keymap-qcode-to-atset3.c \
- ui/input-keymap-qcode-to-linux.c \
- ui/input-keymap-qcode-to-qnum.c \
- ui/input-keymap-qcode-to-sun.c \
- ui/input-keymap-qnum-to-qcode.c \
- ui/input-keymap-usb-to-qcode.c \
- ui/input-keymap-win32-to-qcode.c \
- ui/input-keymap-x11-to-qcode.c \
- ui/input-keymap-xorgevdev-to-qcode.c \
- ui/input-keymap-xorgkbd-to-qcode.c \
- ui/input-keymap-xorgxquartz-to-qcode.c \
- ui/input-keymap-xorgxwin-to-qcode.c \
- ui/input-keymap-osx-to-qcode.c \
+ ui/input-keymap-atset1-to-qcode.c.inc \
+ ui/input-keymap-linux-to-qcode.c.inc \
+ ui/input-keymap-qcode-to-atset1.c.inc \
+ ui/input-keymap-qcode-to-atset2.c.inc \
+ ui/input-keymap-qcode-to-atset3.c.inc \
+ ui/input-keymap-qcode-to-linux.c.inc \
+ ui/input-keymap-qcode-to-qnum.c.inc \
+ ui/input-keymap-qcode-to-sun.c.inc \
+ ui/input-keymap-qnum-to-qcode.c.inc \
+ ui/input-keymap-usb-to-qcode.c.inc \
+ ui/input-keymap-win32-to-qcode.c.inc \
+ ui/input-keymap-x11-to-qcode.c.inc \
+ ui/input-keymap-xorgevdev-to-qcode.c.inc \
+ ui/input-keymap-xorgkbd-to-qcode.c.inc \
+ ui/input-keymap-xorgxquartz-to-qcode.c.inc \
+ ui/input-keymap-xorgxwin-to-qcode.c.inc \
+ ui/input-keymap-osx-to-qcode.c.inc \
$(NULL)
generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
-ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
+ui/input-keymap-%.c.inc: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
$(call quiet-command,\
stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \
test -e $(KEYCODEMAP_GEN) && \