Re: [PATCH] replace "make ARCH=i386/x86_64 with make ARCH=x86"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 
> > For now it just error out like this:
> > $ make ARCH=i386
> > Makefile:503: /home/sam/kernel/x86.git/arch/i386/Makefile: No such file or directory
> > make: *** No rule to make target `/home/sam/kernel/x86.git/arch/i386/Makefile'.  Stop.
> 
> Sounds fine, other architectures had that exactly same issue before.  Maybe
> we can add a more useful message thouigh like
> 
> $ARCH does not exist for any non-existant arch.

Like this:
$ make ARCH=foo
Makefile:201: *** "ERROR: ARCH (foo) does not exist".  Stop.

Implemented by following patch.

	Sam

diff --git a/Makefile b/Makefile
index cd8701e..9c46a70 100644
--- a/Makefile
+++ b/Makefile
@@ -196,6 +196,11 @@ CROSS_COMPILE	?=
 UTS_MACHINE 	:= $(ARCH)
 SRCARCH 	:= $(ARCH)
 
+# Sanity check the specified ARCH
+ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)),)
+        $(error "ERROR: ARCH ($(SRCARCH)) does not exist")
+endif
+
 KCONFIG_CONFIG	?= .config
 
 # SHELL used by kbuild
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux