From: "Zhu, Yi" <yi.zhu@intel.com>
The "make rpm" rule in top Makefile isn't aware of the enviorment ARCH. For
example, people issue "make ARCH=ia64" to compile the ia64 kernel on i386
platform for cross compilation. This works pretty well now. But if one uses
"make rpm ARCH=ia64", it will fail. Because current rpm rule in Makefile and
mkspec are not aware of ARCH.
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\
mv -f $(objtree)/.tmp_version $(objtree)/.version;
- $(RPM) -ta ../$(KERNELPATH).tar.gz
+ $(RPM) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz
rm ../$(KERNELPATH).tar.gz
# Brief documentation of the typical targets used
# Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
#
# That's the voodoo to see if it's a x86.
-ISX86=`arch | grep -ie i.86`
+ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86`
if [ ! -z $ISX86 ]; then
PC=1
else