diff mbox series

[XEN,v6,15/31] build: move make option changes check earlier

Message ID 20210701141011.785641-16-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series xen: Build system improvements | expand

Commit Message

Anthony PERARD July 1, 2021, 2:09 p.m. UTC
And thus avoiding checking for those variable over and over again.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/Makefile | 22 ++++++++++++++++++++++
 xen/Rules.mk | 22 ----------------------
 2 files changed, 22 insertions(+), 22 deletions(-)

Comments

Jan Beulich July 7, 2021, 3:40 p.m. UTC | #1
On 01.07.2021 16:09, Anthony PERARD wrote:
> And thus avoiding checking for those variable over and over again.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
in its present shape since all you do is move existing logic. But I
wonder if I could talk you into ...

> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -56,6 +56,28 @@ include scripts/Kbuild.include
>  ifneq ($(root-make-done),y)
>  # section to run before calling Rules.mk, but only once.
>  
> +ifneq ($(origin crash_debug),undefined)
> +$(error "You must use 'make menuconfig' to enable/disable crash_debug now.")
> +endif
> +ifeq ($(origin debug),command line)
> +$(warning "You must use 'make menuconfig' to enable/disable debug now.")
> +endif
> +ifneq ($(origin frame_pointer),undefined)
> +$(error "You must use 'make menuconfig' to enable/disable frame_pointer now.")
> +endif
> +ifneq ($(origin kexec),undefined)
> +$(error "You must use 'make menuconfig' to enable/disable kexec now.")
> +endif
> +ifneq ($(origin lock_profile),undefined)
> +$(error "You must use 'make menuconfig' to enable/disable lock_profile now.")
> +endif
> +ifneq ($(origin perfc),undefined)
> +$(error "You must use 'make menuconfig' to enable/disable perfc now.")
> +endif
> +ifneq ($(origin verbose),undefined)
> +$(error "You must use 'make menuconfig' to enable/disable verbose now.")
> +endif

... doing away with the misleading mentioning of just "menuconfig" here.
There are various other *config targets, many of which are also suitable
for the purpose. Personally I've used menuconfig (in Linux) the last
time perhaps 15 years ago, and hence I have almost forgotten about its
existence. IOW at the very least I'd see us insert "e.g." everywhere.

Jan
Anthony PERARD July 12, 2021, 4:21 p.m. UTC | #2
On Wed, Jul 07, 2021 at 05:40:02PM +0200, Jan Beulich wrote:
> On 01.07.2021 16:09, Anthony PERARD wrote:
> > And thus avoiding checking for those variable over and over again.
> > 
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>
> in its present shape since all you do is move existing logic. But I
> wonder if I could talk you into ...
> 
> > +ifneq ($(origin verbose),undefined)
> > +$(error "You must use 'make menuconfig' to enable/disable verbose now.")
> > +endif
> 
> ... doing away with the misleading mentioning of just "menuconfig" here.
> There are various other *config targets, many of which are also suitable
> for the purpose. Personally I've used menuconfig (in Linux) the last
> time perhaps 15 years ago, and hence I have almost forgotten about its
> existence. IOW at the very least I'd see us insert "e.g." everywhere.

Hopefully, no one ever hits those error anymore, it's been 5 years it
seems since the changes has been made.

But I can write instead:
    "You must use e.g. 'make menuconfig' to enable/disable verbose now."
or maybe:
    "You must use Kconfig with e.g. 'make menuconfig' to enable/disable verbose now."
    ?

Thanks,
Jan Beulich July 13, 2021, 7:42 a.m. UTC | #3
On 12.07.2021 18:21, Anthony PERARD wrote:
> On Wed, Jul 07, 2021 at 05:40:02PM +0200, Jan Beulich wrote:
>> On 01.07.2021 16:09, Anthony PERARD wrote:
>>> And thus avoiding checking for those variable over and over again.
>>>
>>> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
>>
>> Acked-by: Jan Beulich <jbeulich@suse.com>
>> in its present shape since all you do is move existing logic. But I
>> wonder if I could talk you into ...
>>
>>> +ifneq ($(origin verbose),undefined)
>>> +$(error "You must use 'make menuconfig' to enable/disable verbose now.")
>>> +endif
>>
>> ... doing away with the misleading mentioning of just "menuconfig" here.
>> There are various other *config targets, many of which are also suitable
>> for the purpose. Personally I've used menuconfig (in Linux) the last
>> time perhaps 15 years ago, and hence I have almost forgotten about its
>> existence. IOW at the very least I'd see us insert "e.g." everywhere.
> 
> Hopefully, no one ever hits those error anymore, it's been 5 years it
> seems since the changes has been made.
> 
> But I can write instead:
>     "You must use e.g. 'make menuconfig' to enable/disable verbose now."
> or maybe:
>     "You must use Kconfig with e.g. 'make menuconfig' to enable/disable verbose now."
>     ?

Either would be fine with me, with a slight preference to the shorter
form.

Jan
diff mbox series

Patch

diff --git a/xen/Makefile b/xen/Makefile
index dae0247067ff..06d7bfab3e2c 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -56,6 +56,28 @@  include scripts/Kbuild.include
 ifneq ($(root-make-done),y)
 # section to run before calling Rules.mk, but only once.
 
+ifneq ($(origin crash_debug),undefined)
+$(error "You must use 'make menuconfig' to enable/disable crash_debug now.")
+endif
+ifeq ($(origin debug),command line)
+$(warning "You must use 'make menuconfig' to enable/disable debug now.")
+endif
+ifneq ($(origin frame_pointer),undefined)
+$(error "You must use 'make menuconfig' to enable/disable frame_pointer now.")
+endif
+ifneq ($(origin kexec),undefined)
+$(error "You must use 'make menuconfig' to enable/disable kexec now.")
+endif
+ifneq ($(origin lock_profile),undefined)
+$(error "You must use 'make menuconfig' to enable/disable lock_profile now.")
+endif
+ifneq ($(origin perfc),undefined)
+$(error "You must use 'make menuconfig' to enable/disable perfc now.")
+endif
+ifneq ($(origin verbose),undefined)
+$(error "You must use 'make menuconfig' to enable/disable verbose now.")
+endif
+
 # Beautify output
 # ---------------------------------------------------------------------------
 #
diff --git a/xen/Rules.mk b/xen/Rules.mk
index ede408efc515..894f2b83a04e 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -9,28 +9,6 @@  include $(XEN_ROOT)/Config.mk
 include $(BASEDIR)/scripts/Kbuild.include
 
 
-ifneq ($(origin crash_debug),undefined)
-$(error "You must use 'make menuconfig' to enable/disable crash_debug now.")
-endif
-ifeq ($(origin debug),command line)
-$(warning "You must use 'make menuconfig' to enable/disable debug now.")
-endif
-ifneq ($(origin frame_pointer),undefined)
-$(error "You must use 'make menuconfig' to enable/disable frame_pointer now.")
-endif
-ifneq ($(origin kexec),undefined)
-$(error "You must use 'make menuconfig' to enable/disable kexec now.")
-endif
-ifneq ($(origin lock_profile),undefined)
-$(error "You must use 'make menuconfig' to enable/disable lock_profile now.")
-endif
-ifneq ($(origin perfc),undefined)
-$(error "You must use 'make menuconfig' to enable/disable perfc now.")
-endif
-ifneq ($(origin verbose),undefined)
-$(error "You must use 'make menuconfig' to enable/disable verbose now.")
-endif
-
 TARGET := $(BASEDIR)/xen
 
 # Note that link order matters!