From: Jan Beulich <jbeulich@suse.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [XEN PATCH v2 09/12] xen/build: include include/config/auto.conf in main Makefile
Date: Mon, 3 Feb 2020 13:20:34 +0100 [thread overview]
Message-ID: <0e3006bf-a1ad-5efa-a0ce-0cd50f2653b6@suse.com> (raw)
In-Reply-To: <20200203114509.GB2306@perard.uk.xensource.com>
On 03.02.2020 12:45, Anthony PERARD wrote:
> On Thu, Jan 30, 2020 at 02:06:18PM +0100, Jan Beulich wrote:
>> On 17.01.2020 11:53, Anthony PERARD wrote:
>>> --- a/xen/Makefile
>>> +++ b/xen/Makefile
>>> @@ -49,7 +49,71 @@ default: build
>>> .PHONY: dist
>>> dist: install
>>>
>>> -build install:: include/config/auto.conf
>>> +
>>> +ifndef root-make-done
>>> +# section to run before calling Rules.mk, but only once.
>>> +#
>>> +# To make sure we do not include .config for any of the *config targets
>>> +# catch them early, and hand them over to tools/kconfig/Makefile
>>> +
>>> +clean-targets := %clean
>>> +no-dot-config-targets := $(clean-targets) \
>>> + uninstall debug cloc \
>>> + cscope TAGS tags MAP gtags \
>>> + xenversion
>>> +
>>> +config-build :=
>>
>> Is this actually needed? While correct (afaict) together with the
>> ifdef further down, I find this aspect of make behavior a little
>> confusing, and hence it would seem slightly better if there was
>> no empty definition of this symbol.
>
> That's actually a very recent change in Linux source code. They used to
> use ifeq($(config-build),1) and ifeq($(config-build),0). I can certainly
> change back to use ifeq instead of ifdef.
Then perhaps, along the lines of ...
>>> +need-config := 1
>>
>> Here and below, would it be possible to use y instead of 1, to
>> match how "true" gets expressed in various places elsewhere?
>> Or would there again be deviation-from-Linux concerns?
>
> It's probably fine to use "y". I don't think it matter, we need to make
> quite a lot of changes compare to Linux anyway. I'll use "n" for the
> negative.
... this, also use y/n?
>>> +ifdef config-build
>>> +# ===========================================================================
>>> +# *config targets only - make sure prerequisites are updated, and descend
>>> +# in tools/kconfig to make the *config target
>>> +
>>> +config: FORCE
>>> + $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" $@
>>> +
>>> +# Config.mk tries to include .config file, don't try to remake it
>>> +%/.config: ;
>>
>> This didn't exist before - why is it needed all of the sudden?
>
> It's because I'm introducing a new target "%config". So when make
> "-include $(XEN_ROOT)/.config" (as found in Config.mk) it check if the
> file needs to be rebuilt, and find %config and thus run kconfig to build
> .config.
>
> Currently, Makefile list all the targets that needs to be built with
> kconfig.
Ah, I see - we didn't have a %config target anywhere at all.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-02-03 12:20 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 10:53 [Xen-devel] [XEN PATCH v2 00/12] xen: Build system improvements Anthony PERARD
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 01/12] xen/build: Remove left over -DMAX_PHYS_IRQS Anthony PERARD
2020-01-17 11:03 ` Jan Beulich
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 02/12] xen/build: Use obj-y += subdir/ instead of subdir-y Anthony PERARD
2020-01-29 14:19 ` Jan Beulich
2020-01-30 16:54 ` Anthony PERARD
2020-01-31 8:35 ` Jan Beulich
2020-02-03 11:31 ` Anthony PERARD
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 03/12] xen/build: use $(clean) shorthand for clean targets Anthony PERARD
2020-01-29 14:21 ` Jan Beulich
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 04/12] xen/build: extract clean target from Rules.mk Anthony PERARD
2020-01-29 14:30 ` Jan Beulich
2020-01-30 18:10 ` Anthony PERARD
2020-01-31 8:50 ` Jan Beulich
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 05/12] xen/include: remove include of Config.mk Anthony PERARD
2020-01-29 15:28 ` Jan Beulich
2020-01-29 15:33 ` Jan Beulich
2020-01-30 18:34 ` Anthony PERARD
2020-01-31 8:56 ` Jan Beulich
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 06/12] xen/test/livepatch: " Anthony PERARD
2020-01-17 17:17 ` Ross Lagerwall
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 07/12] xen/build: run targets csopes, tags, .. without Rules.mk Anthony PERARD
2020-01-30 11:29 ` Jan Beulich
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 08/12] xen/build: make tests in test/ directly Anthony PERARD
2020-01-30 11:31 ` Jan Beulich
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 09/12] xen/build: include include/config/auto.conf in main Makefile Anthony PERARD
2020-01-30 13:06 ` Jan Beulich
2020-02-03 11:45 ` Anthony PERARD
2020-02-03 12:20 ` Jan Beulich [this message]
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 10/12] xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS) Anthony PERARD
2020-01-30 13:29 ` Jan Beulich
2020-02-03 12:17 ` Anthony PERARD
2020-02-03 12:34 ` Jan Beulich
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 11/12] xen/build: introduce ccflags-y and CFLAGS_$@ Anthony PERARD
2020-01-30 13:39 ` Jan Beulich
2020-02-03 14:23 ` Anthony PERARD
2020-02-03 15:20 ` Jan Beulich
2020-01-17 10:53 ` [Xen-devel] [XEN PATCH v2 12/12] xen/build: have the root Makefile generates the CFLAGS Anthony PERARD
2020-01-30 14:33 ` Jan Beulich
2020-02-03 13:57 ` Anthony PERARD
2020-02-03 15:26 ` Jan Beulich
2020-01-21 13:59 ` [Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests Anthony PERARD
2020-01-30 11:37 ` Jan Beulich
2020-02-03 14:29 ` Anthony PERARD
2020-02-03 15:21 ` Jan Beulich
2020-01-21 13:59 ` [Xen-devel] [XEN PATCH v2.1 14/12] squash! xen/build: introduce ccflags-y and CFLAGS_$@ Anthony PERARD
2020-01-21 13:59 ` [Xen-devel] [XEN PATCH v2.1 15/12] squash! xen/build: have the root Makefile generates the CFLAGS Anthony PERARD
2020-01-30 13:32 ` Jan Beulich
2020-02-03 14:32 ` Anthony PERARD
2020-01-21 14:08 ` [Xen-devel] [XEN PATCH v2 00/12] xen: Build system improvements Anthony PERARD
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=0e3006bf-a1ad-5efa-a0ce-0cd50f2653b6@suse.com \
--to=jbeulich@suse.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=julien@xen.org \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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).