From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK0Tj-0000kr-OB for qemu-devel@nongnu.org; Thu, 12 Sep 2013 02:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VK0Tb-0000EM-AY for qemu-devel@nongnu.org; Thu, 12 Sep 2013 02:34:11 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:49307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK0Tb-0000ED-3b for qemu-devel@nongnu.org; Thu, 12 Sep 2013 02:34:03 -0400 Received: by mail-ee0-f45.google.com with SMTP id c50so5073974eek.18 for ; Wed, 11 Sep 2013 23:34:02 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <52316061.1040905@redhat.com> Date: Thu, 12 Sep 2013 08:34:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1378906448-15834-1-git-send-email-famz@redhat.com> <1378906448-15834-3-git-send-email-famz@redhat.com> <52307375.2060403@redhat.com> <20130912025251.GJ9134@T430s.nay.redhat.com> In-Reply-To: <20130912025251.GJ9134@T430s.nay.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 2/8] rule.mak: allow per object cflags and libs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: famz@redhat.com Cc: peter.maydell@linaro.org, mjt@tls.msk.ru, qemu-devel@nongnu.org, stefanha@redhat.com, vilanova@ac.upc.edu, rth@twiddle.net Il 12/09/2013 04:52, Fam Zheng ha scritto: >>> > > define unnest-dir >>> > > $(foreach var,$(nested-vars),$(call push-var,$(var),$1/)) >>> > > $(eval obj-parent-$1 := $(obj)) >>> > > $(eval obj := $(if $(obj),$(obj)/$1,$1)) >>> > > $(eval include $(SRC_PATH)/$1/Makefile.objs) >>> > > +$(foreach v,$(nested-vars),$(call fix-obj-vars,$v,$(if $(obj),$(obj)/))) >>> > > $(eval obj := $(obj-parent-$1)) >>> > > $(eval obj-parent-$1 := ) >>> > > $(foreach var,$(nested-vars),$(call pop-var,$(var),$1/)) >>> > > >> > >> > I'm not sure this will work for targets in the toplevel directory when >> > obj-base is not empty. This can be fixed later though, as part of a >> > general revamping of obj-base. Please add a FIXME comment. >> > > I'm not sure about the problem, can you give an example, so I can be specific > in the comment? Can you try using vl.o-cflags instead of a per-target QEMU_CFLAGS? I think it won't work, because the toplevel Makefile.objs is included directly and not through unnest-dir. Paolo