Message ID | 1469547940-19406-1-git-send-email-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 26.07.16 at 17:45, <roger.pau@citrix.com> 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). > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -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? > + > > ifneq ($(origin crash_debug),undefined) And please don't add a stray second blank line like this. Jan
On Mon, Aug 01, 2016 at 09:21:28AM -0600, Jan Beulich wrote: > >>> On 26.07.16 at 17:45, <roger.pau@citrix.com> 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. > > --- a/xen/Rules.mk > > +++ b/xen/Rules.mk > > @@ -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? > > > + > > > > 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.
>>> On 02.08.16 at 15:58, <roger.pau@citrix.com> wrote: > On Mon, Aug 01, 2016 at 09:21:28AM -0600, Jan Beulich wrote: >> >>> On 26.07.16 at 17:45, <roger.pau@citrix.com> 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? 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
diff --git a/xen/Rules.mk b/xen/Rules.mk index ebe1dc0..8fc44d3 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -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.
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). Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- Cc: Andrew Cooper <andrew.cooper3@citrix.com> Cc: George Dunlap <George.Dunlap@eu.citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Tim Deegan <tim@xen.org> Cc: Wei Liu <wei.liu2@citrix.com> Cc: Doug Goldstein <cardoe@cardoe.com> --- xen/Rules.mk | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)