From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuJui-0005f2-PI for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:08:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuJub-0006uC-T9 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:08:24 -0400 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:37531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuJub-0006u0-Iv for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:08:17 -0400 Received: by mail-wg0-f45.google.com with SMTP id l18so1260653wgh.4 for ; Tue, 10 Jun 2014 04:08:16 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 10 Jun 2014 13:08:11 +0200 Message-Id: <1402398491-19097-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1402398491-19097-1-git-send-email-pbonzini@redhat.com> References: <1402398491-19097-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 v2 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 --- rules.mak | 237 +++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 158 insertions(+), 79 deletions(-) diff --git a/rules.mak b/rules.mak index b12d312..5598d3f 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$(