From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJnSn-0006qb-9W for qemu-devel@nongnu.org; Wed, 11 Sep 2013 12:40:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJnSg-000392-2a for qemu-devel@nongnu.org; Wed, 11 Sep 2013 12:40:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJnSf-00038j-PR for qemu-devel@nongnu.org; Wed, 11 Sep 2013 12:40:14 -0400 Message-ID: <52309CE8.8010209@redhat.com> Date: Wed, 11 Sep 2013 18:40:08 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1378906448-15834-1-git-send-email-famz@redhat.com> <1378906448-15834-2-git-send-email-famz@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 1/8] make.rule: fix $(obj) to a real relative path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Fam Zheng , Michael Tokarev , QEMU Developers , Stefan Hajnoczi , =?UTF-8?B?TGx1w61zIFZpbGFub3Zh?= , Richard Henderson Il 11/09/2013 18:38, Peter Maydell ha scritto: > On 11 September 2013 14:34, Fam Zheng wrote: >> Makefile.target includes rule.mak and unnested common-obj-y, then prefix >> them with '../', this will ignore object specific QEMU_CFLAGS in subdir >> Makefile.objs: >> >> $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) >> >> Because $(obj) here is './block', instead of '../block'. This doesn't >> hurt compiling because we basically build all .o from top Makefile, >> before entering Makefile.target, but it will affact arriving per-object >> libs support. >> >> The starting point of $(obj) is passed in as argument of unnest-vars, as >> well as nested variables, so that different Makefiles can pass in a >> right value. > > This breaks compilation on MacOSX of the cocoa UI: > make[1]: *** No rule to make target > `/Users/pm215/src/qemu/../ui/cocoa.m', needed by `../ui/cocoa.o'. > Stop. > > because the dependency in ui/Makefile.objs: > > $(obj)/cocoa.o: $(SRC_PATH)/$(obj)/cocoa.m > > now results in cocoa.o depending on ../ui/cocoa.m > rather than ui/cocoa.m. > > I think the right fix for this is just to delete that line > from ui/Makefile.objs, because we have a generic > rule that says "you can build foo.o from foo.m with > an objective-C compiler". That needs to be done > before this series can be applied though. Can you test it? Paolo