[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 1/8] make.rule: fix $(obj) to a real relative
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v6 1/8] make.rule: fix $(obj) to a real relative path |
Date: |
Wed, 11 Sep 2013 17:38:19 +0100 |
On 11 September 2013 14:34, Fam Zheng <address@hidden> 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.
-- PMM
[Qemu-devel] [PATCH v6 3/8] Makefile: introduce common-obj-m and block-obj-m for DSO, Fam Zheng, 2013/09/11