[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.9] xen/test/Makefile: Fix clean target, broken by pattern rule
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@xxxxxxxxxx> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>And Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Release-acked-by: Julien Grall <julien.grall@xxxxxxx> Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |