
From: Pavel Pisa <pisa@cmp.felk.cvut.cz>

This patch ensures that architecture and target cross-tools prefix is
preserved in the Makefile generated in the build directory for out of
source tree kernel compilation.  This prevents accidental screwing of
configuration and builds for the case, that make without full architecture
specific options is invoked in the build directory.  It is secure use
accustomed "make", "make xconfig", etc.  without fear and special care now.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 scripts/mkmakefile |    6 ++++++
 1 files changed, 6 insertions(+)

diff -puN scripts/mkmakefile~preserve-arch-and-cross_compile-in-the-build-directory-generated-makefile scripts/mkmakefile
--- 25/scripts/mkmakefile~preserve-arch-and-cross_compile-in-the-build-directory-generated-makefile	2005-04-29 18:08:18.651892256 -0700
+++ 25-akpm/scripts/mkmakefile	2005-04-29 18:08:18.660890888 -0700
@@ -29,3 +29,9 @@ all:
 
 EOF
 
+if [ -n "${ARCH}" ] ; then
+	echo "ARCH ?= ${ARCH}"
+fi
+if [ -n "${CROSS_COMPILE}" ] ; then
+	echo "CROSS_COMPILE ?= ${CROSS_COMPILE}"
+fi
_
