[PATCH 11/11] kbuild: sanity check the specified arch

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sam Ravnborg
Date: Friday, November 9, 2007 - 4:20 pm

If the ARCH used does not exist print out the following:
Makefile:203: *** "ERROR: ARCH (i386) does not exist (for i386 and x86_64 use ARCH=x86)".  Stop.
This check is highly relevant now i386 and x86_64 are gone.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Christoph Hellwig <hch@infradead.org>
---
 Makefile |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index afeeef8..902082b 100644
--- a/Makefile
+++ b/Makefile
@@ -198,6 +198,11 @@ CROSS_COMPILE	?=
 UTS_MACHINE 	:= $(ARCH)
 SRCARCH 	:= $(ARCH)
 
+# Sanity check the specified ARCH
+ifeq ($(wildcard $(srctree)/arch/$(ARCH)/Kconfig),)
+        $(error "ERROR: ARCH ($(ARCH)) does not exist (for i386 and x86_64 use ARCH=x86)")
+endif
+
 KCONFIG_CONFIG	?= .config
 
 # SHELL used by kbuild
-- 
1.5.3.4.1157.g0e74-dirty

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Sam Ravnborg, (Fri Nov 9, 4:08 pm)
[PATCH 01/11] x86: unification of cfufreq/Kconfig, Sam Ravnborg, (Fri Nov 9, 4:20 pm)
[PATCH 03/11] x86: arch/x86/Kconfig.cpu unification, Sam Ravnborg, (Fri Nov 9, 4:20 pm)
[PATCH 09/11] x86: enable &quot;make ARCH=x86&quot;, Sam Ravnborg, (Fri Nov 9, 4:20 pm)
[PATCH 11/11] kbuild: sanity check the specified arch, Sam Ravnborg, (Fri Nov 9, 4:20 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Jeff Garzik, (Fri Nov 9, 8:23 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Randy Dunlap, (Fri Nov 9, 8:37 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Adrian Bunk, (Fri Nov 9, 8:50 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Brian Gerst, (Fri Nov 9, 9:05 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Jeff Garzik, (Fri Nov 9, 9:12 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Nick Piggin, (Fri Nov 9, 10:26 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Sam Ravnborg, (Sat Nov 10, 12:54 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Paul Mundt, (Sat Nov 10, 1:21 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Jeff Garzik, (Sat Nov 10, 1:23 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Jeff Garzik, (Sat Nov 10, 1:24 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Paul Mundt, (Sat Nov 10, 1:44 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Adrian Bunk, (Sat Nov 10, 2:21 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Paul Mundt, (Sat Nov 10, 2:26 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Sam Ravnborg, (Sat Nov 10, 2:39 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Adrian Bunk, (Sat Nov 10, 3:13 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Christoph Hellwig, (Sat Nov 10, 8:53 am)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, H. Peter Anvin, (Sat Nov 10, 1:35 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Sam Ravnborg, (Sat Nov 10, 1:46 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Theodore Tso, (Sat Nov 10, 2:24 pm)
Re: [PATCH 0/11 v3] enable &quot;make ARCH=x86&quot;, Roman Zippel, (Wed Nov 14, 1:13 pm)