Skip to contentSkip to conversation

xen/kconfig: unify messages of options moved from command line to kconfig

PATCH In review Roger Pau Monne 2 participants 4 messages Jul 26, 2016 – Aug 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/kconfig: unify messages of options moved from command line to kconfig

Change the message so that it mentions running from the top level directory and using '-C xen' in order to call the 'menuconfig' target inside of the xen directory (there's no top-level menuconfig target).

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Doug Goldstein <[email protected]>

---
 xen/Rules.mk | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
xen/Rules.mk +11 -7
index ebe1dc0..8fc44d3 100644
@@ -9,27 +9,31 @@ lto           ?= n
 
 include $(XEN_ROOT)/Config.mk
 
+error_str = "You must use '$(MAKE) -C xen menuconfig' from the top level directory to enable/disable $(1) now."
+error_msg = $(error $(error_str))
+warning_msg = $(warning $(error_str))
+
 
 ifneq ($(origin crash_debug),undefined)
-$(error "You must use 'make menuconfig' to enable/disable crash_debug now.")
+$(call error_msg,crash_debug)
 endif
 ifeq ($(origin debug),command line)
-$(warning "You must use 'make menuconfig' to enable/disable debug now.")
+$(call warning_msg,debug)
 endif
 ifneq ($(origin frame_pointer),undefined)
-$(error "You must use 'make menuconfig' to enable/disable frame_pointer now.")
+$(call error_msg,frame_pointer)
 endif
 ifneq ($(origin kexec),undefined)
-$(error "You must use 'make menuconfig' to enable/disable kexec now.")
+$(call error_msg,kexec)
 endif
 ifneq ($(origin lock_profile),undefined)
-$(error "You must use 'make menuconfig' to enable/disable lock_profile now.")
+$(call error_msg,lock_profile)
 endif
 ifneq ($(origin perfc),undefined)
-$(error "You must use 'make menuconfig' to enable/disable perfc now.")
+$(call error_msg,perfc)
 endif
 ifneq ($(origin verbose),undefined)
-$(error "You must use 'make menuconfig' to enable/disable verbose now.")
+$(call error_msg,verbose)
 endif
 
 # Set ARCH/SUBARCH appropriately.
Signature · 7 lines
2.7.4 (Apple Git-66)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 26.07.16 at 17:45, <[email protected]> wrote:

Change the message so that it mentions running from the top level directory and using '-C xen' in order to call the 'menuconfig' target inside of the xen directory (there's no top-level menuconfig target).

Well, I'm not convinced whether this end up clarifying or confusing things, as that partly depends on how you normally invoke make (or the various makes of the sub-trees individually).

xen/Rules.mk lto ?= n · line 14

Quoted 9 lines
xen/Rules.mk +3 -0
@@ -9,27 +9,31 @@ lto           ?= n
 
 include $(XEN_ROOT)/Config.mk
 
+error_str = "You must use '$(MAKE) -C xen menuconfig' from the top level directory to enable/disable $(1) now."
+error_msg = $(error $(error_str))
+warning_msg = $(warning $(error_str))

In any event with the two given uses "error_str" is not an appropriate name. How about "build-diag" or some such?

xen/Rules.mk lto ?= n · line 17

Quoted 3 lines
xen/Rules.mk +1 -0
+
 
 ifneq ($(origin crash_debug),undefined)

And please don't add a stray second blank line like this.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 8 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 26.07.16 at 17:45, <[email protected]> wrote:

Change the message so that it mentions running from the top level directory and using '-C xen' in order to call the 'menuconfig' target inside of the xen directory (there's no top-level menuconfig target).

Well, I'm not convinced whether this end up clarifying or confusing things, as that partly depends on how you normally invoke make (or the various makes of the sub-trees individually).

Hm, and what about adding a top-level menuconfig target, does that sound any better?

TBH, I'm not specially thrilled either way, I just think the message is misleading, but I don't mind putting this aside if everyone else is fine with it.

Quoted 13 lines

xen/Rules.mk lto ?= n · line 14

Quoted 9 lines
xen/Rules.mk +3 -0
@@ -9,27 +9,31 @@ lto           ?= n
 
 include $(XEN_ROOT)/Config.mk
 
+error_str = "You must use '$(MAKE) -C xen menuconfig' from the top level directory to enable/disable $(1) now."
+error_msg = $(error $(error_str))
+warning_msg = $(warning $(error_str))

In any event with the two given uses "error_str" is not an appropriate name. How about "build-diag" or some such?

Quoted 5 lines

xen/Rules.mk lto ?= n · line 17

Quoted 3 lines
xen/Rules.mk +1 -0
+
 
 ifneq ($(origin crash_debug),undefined)

And please don't add a stray second blank line like this.

Ack to the above comments, but will wait for opinions before resending.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 02.08.16 at 15:58, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 26.07.16 at 17:45, <[email protected]> wrote:

Change the message so that it mentions running from the top level directory and using '-C xen' in order to call the 'menuconfig' target inside of the xen directory (there's no top-level menuconfig target).

Quoted 6 lines
Quoted 3 lines

Well, I'm not convinced whether this end up clarifying or confusing things, as that partly depends on how you normally invoke make (or the various makes of the sub-trees individually).

Hm, and what about adding a top-level menuconfig target, does that sound any better?

Well, suitable named, that might be an option. "menuconfig" won't do well, since that's only relevant to the xen/ subtree. Something like "xen-config" maybe? Doug, any thoughts?

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel