From: Wei Chen <wei.chen@linaro.org>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
steve.capper@arm.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, xen-devel@lists.xen.org,
Julien Grall <julien.grall@arm.com>
Subject: Re: [RFC v2] xen/arm: build: add missed dependency for head.S
Date: Wed, 8 Jun 2016 11:10:08 +0800 [thread overview]
Message-ID: <CANta1d8-bWWzE0MOBWOaY_q7LHp4XN94ycvYiziJL06U8NUd5w@mail.gmail.com> (raw)
In-Reply-To: <20160607131826.GA8000@x230.dumpdata.com>
On 7 June 2016 at 21:18, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> On Tue, Jun 07, 2016 at 12:34:43PM +0800, Wei Chen wrote:
>> In current Xen build rules, the build system will only check the
>> dependencies in current folder and obj-y generated dependencies
>> in other folder.
>>
>> But Makefile may add some objects to ALL_OBJS. These objects may
>> be not in the same folder as Makefile. Use arch/arm/Makefile as
>> an example:
>> ALL_OBJS := $(TARGET_SUBARCH)/head.o
>>
>> The head.o is not in the same folder as Makefile and is not listed
>> in obj-y. So, when we update the header files that had been included
>> in head.S. The build system would not check the dependency of head.S.
>> The head.S would not be re-compiled.
>>
>> In this patch, we will get objects added by Makefile and add their
>> dependencies to check list.
>>
>> Signed-off-by: Wei Chen <Wei.Chen@linaro.org>
>> ---
>> v1 -> v2:
>> - Use a generic method instead of changing Makefiles
>> ---
>> xen/Rules.mk | 11 ++++++++++-
>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/xen/Rules.mk b/xen/Rules.mk
>> index 961d533..fb3087c 100644
>> --- a/xen/Rules.mk
>> +++ b/xen/Rules.mk
>> @@ -95,12 +95,21 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
>> include Makefile
>>
>> DEPS = .*.d
>> +
>> +# In obj-y and ALL_OBJS, there may have some objects are not in the
>
> You are missing a verb here.
>
> I think you mean to say 'there may be some objects which are not in the'
Thank you! it's my mistake.
>> +# same folder as Makefile, so we have to use gendep to generate
>> +# dependencies for them.
>> +DEP_OBJS = $(obj-y)
>> +
>> +# Extract objects from ALL_OBJS added by Makefile.
>> +DEP_OBJS += $(filter-out %built_in.o,$(ALL_OBJS))
>> +
>> define gendep
>> ifneq ($(1),$(subst /,:,$(1)))
>> DEPS += $(dir $(1)).$(notdir $(1)).d
>> endif
>> endef
>> -$(foreach o,$(filter-out %/,$(obj-y)),$(eval $(call gendep,$(o))))
>> +$(foreach o,$(filter-out %/,$(DEP_OBJS)),$(eval $(call gendep,$(o))))
>>
>> # Ensure each subdirectory has exactly one trailing slash.
>> subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n) $(subdir-)))
>> --
>> 2.7.4
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-08 3:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 10:07 [RFC] xen/arm: build: add missed dependency for head.S Wei Chen
2016-06-06 17:08 ` Julien Grall
2016-06-07 10:03 ` Ian Jackson
2016-06-07 4:34 ` [RFC v2] " Wei Chen
2016-06-07 13:18 ` Konrad Rzeszutek Wilk
2016-06-08 3:10 ` Wei Chen [this message]
2016-06-07 16:01 ` [RFC v2] xen/arm: build: add missed dependency for head.S [and 1 more messages] Ian Jackson
2016-06-07 16:24 ` Wei Liu
2016-06-08 3:14 ` Wei Chen
2016-06-08 8:09 ` Wei Liu
2016-06-07 10:07 ` [RFC] xen/arm: build: add missed dependency for head.S Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANta1d8-bWWzE0MOBWOaY_q7LHp4XN94ycvYiziJL06U8NUd5w@mail.gmail.com \
--to=wei.chen@linaro.org \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=steve.capper@arm.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).