From: Julien Grall <julien.grall@arm.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Ian Jackson <ian.jackson@eu.citrix.com>
Cc: xen-devel@lists.xensource.com, Wei Liu <wei.liu2@citrix.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH for-4.9] xen/test/Makefile: Fix clean target, broken by pattern rule
Date: Tue, 20 Jun 2017 11:37:33 +0100 [thread overview]
Message-ID: <be09918f-1f8f-b54a-c9d5-a149541e859f@arm.com> (raw)
In-Reply-To: <20170619201453.GA26666@char.us.oracle.com>
Hi,
On 06/19/2017 09:14 PM, Konrad Rzeszutek Wilk wrote:
> On Mon, Jun 19, 2017 at 03:23:26PM +0100, Ian Jackson wrote:
>> In "xen/test/livepatch: Regularise Makefiles" we reworked
>> xen/test/Makefile to use a pattern rule. However, there are two
>> problems with this. Both are related to the way that xen/Rules.mk is
>> implicitly part of this Makefile because of the way that Makefiles
>> under xen/ are invoked by their parent directory Makefiles.
>>
>> Firstly, the Rules.mk `clean' target overrides the pattern rule in
>> xen/test/Makefile. The result is that `make -C xen clean' does not
>> actually run the livepatch clean target.
>>
>> The Rules.mk clean target does have provision for recursing into
>> subdirectories, but that feature is tangled up with complex object
>> file iteration machinery which is not desirable here. However, we can
>> extend the Rules.mk clean target since it is a double-colon rules.
>>
>> Sadly this involves duplicating the SUBDIR iteration boilerplate. (A
>> make function could be used but the cure would be worse than the
>> disease.)
>>
>> Secondly, Rules.mk has a number of -include directives. make likes to
>> try to (re)build files mentioned in includes. With the % pattern
>> rule, this applies to those files too.
>>
>> As a result, make -C xen clean would try to build `.*.d' (for example)
>> in xen/test. This would fail with an error message. The error would
>> be ignored because of the `-', but it's annoying and ugly.
>>
>> Solve this by limiting the % pattern rule to the targets we expect it
>> to handle. These are those listed in the top-level Makefile, apart
>> from: those which are subdir- or component-qualified; clean targets
>> (which are handled specially, even distclean); and dist,
>> src-tarball-*, etc. (which are converted to install by an earlier
>> Makefile).
>>
>> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
>
> And
> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2017-06-20 10:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 14:51 [PATCH for-4.9 0/4] Makefiles: Provide way to ship livepatch tests Ian Jackson
2017-06-07 14:51 ` [PATCH 1/4] xen/test/livepatch/Makefile: Install in DESTDIR/usr/lib/debug/xen-livepatch Ian Jackson
2017-06-07 15:04 ` Konrad Rzeszutek Wilk
2017-06-07 14:51 ` [PATCH 2/4] xen/test/livepatch: Regularise Makefiles Ian Jackson
2017-06-07 15:05 ` Konrad Rzeszutek Wilk
2017-06-07 14:51 ` [PATCH 3/4] xen/test/livepatch: Add xen_nop.livepatch to .gitignore Ian Jackson
2017-06-07 15:06 ` Konrad Rzeszutek Wilk
2017-06-07 15:20 ` Jan Beulich
2017-06-07 14:51 ` [PATCH 4/4] Makefile: Provide way to ship livepatch test files Ian Jackson
2017-06-07 15:07 ` Konrad Rzeszutek Wilk
2017-06-07 15:58 ` Andrew Cooper
2017-06-07 15:07 ` [PATCH for-4.9 0/4] Makefiles: Provide way to ship livepatch tests Konrad Rzeszutek Wilk
2017-06-07 15:22 ` Jan Beulich
2017-06-07 15:31 ` Wei Liu
2017-06-07 15:53 ` [PATCH for-4.9 0/4] Makefiles: Provide way to ship livepatch tests [and 1 more messages] Ian Jackson
2017-06-09 12:41 ` [PATCH for-4.9 0/4] Makefiles: Provide way to ship livepatch tests Julien Grall
2017-06-09 14:31 ` Ian Jackson
2017-06-14 10:28 ` Julien Grall
2017-06-19 12:59 ` Ian Jackson
2017-06-19 13:03 ` Andrew Cooper
2017-06-19 14:23 ` [PATCH for-4.9] xen/test/Makefile: Fix clean target, broken by pattern rule Ian Jackson
2017-06-19 14:55 ` Konrad Rzeszutek Wilk
2017-06-19 20:14 ` Konrad Rzeszutek Wilk
2017-06-20 10:37 ` Julien Grall [this message]
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=be09918f-1f8f-b54a-c9d5-a149541e859f@arm.com \
--to=julien.grall@arm.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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).