From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sb9tH-0000wZ-ID for qemu-devel@nongnu.org; Sun, 03 Jun 2012 08:26:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sb9tF-0001ge-C3 for qemu-devel@nongnu.org; Sun, 03 Jun 2012 08:26:39 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:46026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sb9tF-0001Ic-3B for qemu-devel@nongnu.org; Sun, 03 Jun 2012 08:26:37 -0400 Received: by mail-pz0-f45.google.com with SMTP id v2so5107465dad.4 for ; Sun, 03 Jun 2012 05:26:36 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Sun, 3 Jun 2012 14:25:43 +0200 Message-Id: <1338726358-30681-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1338726358-30681-1-git-send-email-pbonzini@redhat.com> References: <1338726358-30681-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 09/24] use nested Makefile rules for qom/ objects List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org qom/ already used a separate makefile. Convert it to use relative paths, and make it declare both common-obj-y and user-obj-y. This way, the upper makefiles do not need to know that some QOM files are compiled twice. Signed-off-by: Paolo Bonzini --- Makefile.objs | 13 +++++++------ qom/Makefile | 6 ++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 2eed180..d823968 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -12,9 +12,7 @@ universal-obj-y += $(qobject-obj-y) ####################################################################### # QOM -include $(SRC_PATH)/qom/Makefile -qom-obj-y = $(addprefix qom/, $(qom-y)) -qom-obj-twice-y = $(addprefix qom/, $(qom-twice-y)) +qom-obj-y = qom/ universal-obj-y += $(qom-obj-y) @@ -94,7 +92,7 @@ fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, $(fsdev-nested-y)) common-obj-y = $(block-obj-y) blockdev.o common-obj-y += $(net-obj-y) -common-obj-y += $(qom-obj-twice-y) +common-obj-y += qom/ common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX)) common-obj-y += readline.o console.o cursor.o common-obj-y += $(oslib-obj-y) @@ -202,7 +200,7 @@ user-obj-y += cutils.o cache-utils.o user-obj-y += module.o user-obj-y += qemu-user.o user-obj-y += $(trace-obj-y) -user-obj-y += $(qom-obj-twice-y) +user-obj-y += qom/ ###################################################################### # libhw @@ -468,5 +466,8 @@ vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS) QEMU_CFLAGS+=$(GLIB_CFLAGS) -nested-vars += # ... +nested-vars += \ + qom-obj-y \ + user-obj-y \ + common-obj-y dummy := $(foreach var, $(nested-vars), $(call unnest-var,$(var))) diff --git a/qom/Makefile b/qom/Makefile index 34c6de5..5ef060a 100644 --- a/qom/Makefile +++ b/qom/Makefile @@ -1,2 +1,4 @@ -qom-y = object.o container.o qom-qobject.o -qom-twice-y = cpu.o +qom-obj-y = object.o container.o qom-qobject.o +qom-obj-twice-y = cpu.o +common-obj-y = $(qom-obj-twice-y) +user-obj-y = $(qom-obj-twice-y) -- 1.7.10.1