public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] replace "make ARCH=i386/x86_64 with make ARCH=x86"
Date: Mon, 5 Nov 2007 18:17:40 +0100	[thread overview]
Message-ID: <20071105171740.GA29481@uranus.ravnborg.org> (raw)
In-Reply-To: <20071105104129.GB3662@infradead.org>

> > 
> > 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

  reply	other threads:[~2007-11-05 17:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-03 23:48 [PATCH] replace "make ARCH=i386/x86_64 with make ARCH=x86" Sam Ravnborg
2007-11-03 23:52 ` Arjan van de Ven
2007-11-04  1:17   ` Adrian Bunk
2007-11-04  2:02 ` Jeff Garzik
2007-11-04  2:48   ` Adrian Bunk
2007-11-04  6:20   ` Jeremy Fitzhardinge
2007-11-05 10:41 ` Christoph Hellwig
2007-11-05 17:17   ` Sam Ravnborg [this message]
2007-11-05 21:36     ` Roland Dreier
2007-11-05 21:49       ` Sam Ravnborg
2007-11-05 23:46         ` H. Peter Anvin
2007-11-06  0:40           ` Guillaume Chazarain
2007-11-06  0:47             ` H. Peter Anvin
2007-11-06  1:29           ` Adrian Bunk
2007-11-06  1:33             ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071105171740.GA29481@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox