From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuPF7-0004Od-27 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 12:49:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuPEy-0008JG-6E for qemu-devel@nongnu.org; Tue, 10 Jun 2014 12:49:48 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:38464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuPEx-0008J4-QX for qemu-devel@nongnu.org; Tue, 10 Jun 2014 12:49:40 -0400 Received: by mail-wi0-f176.google.com with SMTP id n3so3841543wiv.15 for ; Tue, 10 Jun 2014 09:49:39 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 10 Jun 2014 18:49:27 +0200 Message-Id: <1402418967-26903-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1402418967-26903-1-git-send-email-pbonzini@redhat.com> References: <1402418967-26903-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 8/8] rules.mak: Rewrite unnest-vars List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Fam Zheng From: Fam Zheng The macro unnest-vars is the most important, complicated but hard to track magic in QEMU's build system. Rewrite it in a (hopefully) clearer way, with more comments, to make it easier to understand and maintain. Remove DSO_CFLAGS and module-objs-m that are not used. A bonus fix of this version is, per object variables are properly protected in save-objs and load-objs, before including sub-dir Makefile.objs, just as nested variables are. So the occasional same object name from different directory levels won't step on each other's foot. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- v2->v3: add missing trailing backslash for non-libtool rules.mak | 237 +++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 158 insertions(+), 79 deletions(-) diff --git a/rules.mak b/rules.mak index b12d312..dde8e00 100644 --- a/rules.mak +++ b/rules.mak @@ -22,9 +22,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d # Same as -I$(SRC_PATH) -I., but for the nested source/object directories QEMU_INCLUDES += -I$(