build: replace GENERATED_FILES by generated-files-y
When possible use generated-files-$(FLAG) to disable some targets (like KEYCODEMAP_FILES). Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Laurent Vivier <lvivier@redhat.com> Message-Id: <20190401141222.30034-3-lvivier@redhat.com>
This commit is contained in:
parent
5b4a969a70
commit
3dff199cca
36
Makefile
36
Makefile
@ -101,7 +101,7 @@ QEMU_PKGVERSION := $(if $(PKGVERSION),$(PKGVERSION),$(shell \
|
|||||||
# Either "version (pkgversion)", or just "version" if pkgversion not set
|
# Either "version (pkgversion)", or just "version" if pkgversion not set
|
||||||
FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSION))
|
FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSION))
|
||||||
|
|
||||||
GENERATED_FILES = qemu-version.h config-host.h qemu-options.def
|
generated-files-y = qemu-version.h config-host.h qemu-options.def
|
||||||
|
|
||||||
GENERATED_QAPI_FILES = qapi/qapi-builtin-types.h qapi/qapi-builtin-types.c
|
GENERATED_QAPI_FILES = qapi/qapi-builtin-types.h qapi/qapi-builtin-types.c
|
||||||
GENERATED_QAPI_FILES += qapi/qapi-types.h qapi/qapi-types.c
|
GENERATED_QAPI_FILES += qapi/qapi-types.h qapi/qapi-types.c
|
||||||
@ -121,20 +121,18 @@ GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.c)
|
|||||||
GENERATED_QAPI_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h
|
GENERATED_QAPI_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h
|
||||||
GENERATED_QAPI_FILES += qapi/qapi-doc.texi
|
GENERATED_QAPI_FILES += qapi/qapi-doc.texi
|
||||||
|
|
||||||
GENERATED_FILES += $(GENERATED_QAPI_FILES)
|
generated-files-y += $(GENERATED_QAPI_FILES)
|
||||||
|
|
||||||
GENERATED_FILES += trace/generated-tcg-tracers.h
|
generated-files-y += trace/generated-tcg-tracers.h
|
||||||
|
|
||||||
GENERATED_FILES += trace/generated-helpers-wrappers.h
|
generated-files-y += trace/generated-helpers-wrappers.h
|
||||||
GENERATED_FILES += trace/generated-helpers.h
|
generated-files-y += trace/generated-helpers.h
|
||||||
GENERATED_FILES += trace/generated-helpers.c
|
generated-files-y += trace/generated-helpers.c
|
||||||
|
|
||||||
ifdef CONFIG_TRACE_UST
|
generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.h
|
||||||
GENERATED_FILES += trace-ust-all.h
|
generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.c
|
||||||
GENERATED_FILES += trace-ust-all.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
GENERATED_FILES += module_block.h
|
generated-files-y += module_block.h
|
||||||
|
|
||||||
TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h)
|
TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h)
|
||||||
TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c)
|
TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c)
|
||||||
@ -147,10 +145,10 @@ ifdef CONFIG_TRACE_UST
|
|||||||
TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
|
TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
GENERATED_FILES += $(TRACE_HEADERS)
|
generated-files-y += $(TRACE_HEADERS)
|
||||||
GENERATED_FILES += $(TRACE_SOURCES)
|
generated-files-y += $(TRACE_SOURCES)
|
||||||
GENERATED_FILES += $(BUILD_DIR)/trace-events-all
|
generated-files-y += $(BUILD_DIR)/trace-events-all
|
||||||
GENERATED_FILES += .git-submodule-status
|
generated-files-y += .git-submodule-status
|
||||||
|
|
||||||
trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
|
trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
|
||||||
|
|
||||||
@ -281,7 +279,7 @@ KEYCODEMAP_FILES = \
|
|||||||
ui/input-keymap-osx-to-qcode.c \
|
ui/input-keymap-osx-to-qcode.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
GENERATED_FILES += $(KEYCODEMAP_FILES)
|
generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
|
||||||
|
|
||||||
ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
|
ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
|
||||||
$(call quiet-command,\
|
$(call quiet-command,\
|
||||||
@ -643,10 +641,10 @@ clean:
|
|||||||
rm -f fsdev/*.pod scsi/*.pod
|
rm -f fsdev/*.pod scsi/*.pod
|
||||||
rm -f qemu-img-cmds.h
|
rm -f qemu-img-cmds.h
|
||||||
rm -f ui/shader/*-vert.h ui/shader/*-frag.h
|
rm -f ui/shader/*-vert.h ui/shader/*-frag.h
|
||||||
@# May not be present in GENERATED_FILES
|
@# May not be present in generated-files-y
|
||||||
rm -f trace/generated-tracers-dtrace.dtrace*
|
rm -f trace/generated-tracers-dtrace.dtrace*
|
||||||
rm -f trace/generated-tracers-dtrace.h*
|
rm -f trace/generated-tracers-dtrace.h*
|
||||||
rm -f $(foreach f,$(GENERATED_FILES),$(f) $(f)-timestamp)
|
rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
|
||||||
rm -f qapi-gen-timestamp
|
rm -f qapi-gen-timestamp
|
||||||
rm -rf qga/qapi-generated
|
rm -rf qga/qapi-generated
|
||||||
for d in $(ALL_SUBDIRS); do \
|
for d in $(ALL_SUBDIRS); do \
|
||||||
@ -1062,7 +1060,7 @@ endif # CONFIG_WIN
|
|||||||
# rebuilt before other object files
|
# rebuilt before other object files
|
||||||
ifneq ($(wildcard config-host.mak),)
|
ifneq ($(wildcard config-host.mak),)
|
||||||
ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
|
ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
|
||||||
Makefile: $(GENERATED_FILES)
|
Makefile: $(generated-files-y)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ else
|
|||||||
obj-y += hw/$(TARGET_BASE_ARCH)/
|
obj-y += hw/$(TARGET_BASE_ARCH)/
|
||||||
endif
|
endif
|
||||||
|
|
||||||
GENERATED_FILES += hmp-commands.h hmp-commands-info.h
|
generated-files-y += hmp-commands.h hmp-commands-info.h
|
||||||
|
|
||||||
endif # CONFIG_SOFTMMU
|
endif # CONFIG_SOFTMMU
|
||||||
|
|
||||||
@ -236,5 +236,5 @@ ifdef CONFIG_TRACE_SYSTEMTAP
|
|||||||
$(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp"
|
$(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
GENERATED_FILES += config-target.h
|
generated-files-y += config-target.h
|
||||||
Makefile: $(GENERATED_FILES)
|
Makefile: $(generated-files-y)
|
||||||
|
@ -12,7 +12,7 @@ obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
|
|||||||
feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
|
feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
|
||||||
feat-dst = $(BUILD_DIR)/$(TARGET_DIR)
|
feat-dst = $(BUILD_DIR)/$(TARGET_DIR)
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
GENERATED_FILES += $(feat-dst)gen-features.h
|
generated-files-y += $(feat-dst)gen-features.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp
|
$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp
|
||||||
|
@ -468,19 +468,19 @@ qapi-schema += unknown-expr-key.json
|
|||||||
|
|
||||||
check-qapi-schema-y := $(addprefix tests/qapi-schema/, $(qapi-schema))
|
check-qapi-schema-y := $(addprefix tests/qapi-schema/, $(qapi-schema))
|
||||||
|
|
||||||
GENERATED_FILES += tests/test-qapi-types.h \
|
generated-files-y += tests/test-qapi-types.h
|
||||||
tests/include/test-qapi-types-sub-module.h \
|
generated-files-y += tests/include/test-qapi-types-sub-module.h
|
||||||
tests/test-qapi-types-sub-sub-module.h \
|
generated-files-y += tests/test-qapi-types-sub-sub-module.h
|
||||||
tests/test-qapi-visit.h \
|
generated-files-y += tests/test-qapi-visit.h
|
||||||
tests/include/test-qapi-visit-sub-module.h \
|
generated-files-y += tests/include/test-qapi-visit-sub-module.h
|
||||||
tests/test-qapi-visit-sub-sub-module.h \
|
generated-files-y += tests/test-qapi-visit-sub-sub-module.h
|
||||||
tests/test-qapi-commands.h \
|
generated-files-y += tests/test-qapi-commands.h
|
||||||
tests/include/test-qapi-commands-sub-module.h \
|
generated-files-y += tests/include/test-qapi-commands-sub-module.h
|
||||||
tests/test-qapi-commands-sub-sub-module.h \
|
generated-files-y += tests/test-qapi-commands-sub-sub-module.h
|
||||||
tests/test-qapi-events.h \
|
generated-files-y += tests/test-qapi-events.h
|
||||||
tests/include/test-qapi-events-sub-module.h \
|
generated-files-y += tests/include/test-qapi-events-sub-module.h
|
||||||
tests/test-qapi-events-sub-sub-module.h \
|
generated-files-y += tests/test-qapi-events-sub-sub-module.h
|
||||||
tests/test-qapi-introspect.h
|
generated-files-y += tests/test-qapi-introspect.h
|
||||||
|
|
||||||
QEMU_CFLAGS += -I$(SRC_PATH)/tests
|
QEMU_CFLAGS += -I$(SRC_PATH)/tests
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user