]> xenbits.xensource.com Git - xen.git/commitdiff
build: move make option changes check earlier
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 7 Sep 2021 07:31:02 +0000 (09:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Sep 2021 07:31:02 +0000 (09:31 +0200)
And thus avoiding checking for those variable over and over again.

Also, add "e.g." in the error messages to hint that "menuconfig"
isn't the only way.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/Makefile
xen/Rules.mk

index 4ceb02d3744174d9ebe4d2103717e44f7f99b776..f47423dacd9aefefb83ff8f30bee8d5915a8b5eb 100644 (file)
@@ -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 e.g. 'make menuconfig' to enable/disable crash_debug now.")
+endif
+ifeq ($(origin debug),command line)
+$(warning "You must use e.g. 'make menuconfig' to enable/disable debug now.")
+endif
+ifneq ($(origin frame_pointer),undefined)
+$(error "You must use e.g. 'make menuconfig' to enable/disable frame_pointer now.")
+endif
+ifneq ($(origin kexec),undefined)
+$(error "You must use e.g. 'make menuconfig' to enable/disable kexec now.")
+endif
+ifneq ($(origin lock_profile),undefined)
+$(error "You must use e.g. 'make menuconfig' to enable/disable lock_profile now.")
+endif
+ifneq ($(origin perfc),undefined)
+$(error "You must use e.g. 'make menuconfig' to enable/disable perfc now.")
+endif
+ifneq ($(origin verbose),undefined)
+$(error "You must use e.g. 'make menuconfig' to enable/disable verbose now.")
+endif
+
 # Beautify output
 # ---------------------------------------------------------------------------
 #
index 11c253026b7bc11b9efe6ee6fcc8c0fe6b421ac7..b7827a56a5e067cae1da99c68e28c31fcf4af5c2 100644 (file)
@@ -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!