From ad14336de8e9cddae9ed29d45bd2e97abb72eaf9 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 8 Jan 2006 19:58:51 +0100 Subject: kbuild: remove GCC_VERSION This was causing some ordering problems. Remove the up-front evaluation and just revaluate the compiler version each time we need it. (The up-front evaluation was problematic because some architectures modify the value of $(CC)). Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- arch/i386/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/i386') diff --git a/arch/i386/Makefile b/arch/i386/Makefile index d121ea18460..8f6b90e44c9 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -39,8 +39,8 @@ include $(srctree)/arch/i386/Makefile.cpu # -mregparm=3 works ok on gcc-3.0 and later # -GCC_VERSION := $(call cc-version) -cflags-$(CONFIG_REGPARM) += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;) +cflags-$(CONFIG_REGPARM) += $(shell if [ $(call cc-version) -ge 0300 ] ; then \ + echo "-mregparm=3"; fi ;) # Disable unit-at-a-time mode, it makes gcc use a lot more stack # due to the lack of sharing of stacklots. -- cgit v1.2.3 From 0d20babd86b40fa5ac55d9ebf31d05f6f7082161 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 7 Jan 2006 17:38:39 -0800 Subject: kbuild: drop vmlinux dependency from "make install" This removes the dependency from vmlinux to install, thus avoiding the current situation where "make install" has a nasty tendency to leave root-turds in the working directory. It also updates x86-64 to be in sync with i386. Signed-off-by: H. Peter Anvin Signed-off-by: Sam Ravnborg --- arch/i386/Makefile | 5 ++--- arch/i386/boot/Makefile | 2 +- arch/i386/boot/install.sh | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) (limited to 'arch/i386') diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 8f6b90e44c9..d3c0409d201 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -103,7 +103,7 @@ AFLAGS += $(mflags-y) boot := arch/i386/boot .PHONY: zImage bzImage compressed zlilo bzlilo \ - zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install + zdisk bzdisk fdimage fdimage144 fdimage288 install all: bzImage @@ -125,8 +125,7 @@ zdisk bzdisk: vmlinux fdimage fdimage144 fdimage288: vmlinux $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ -install: vmlinux -install kernel_install: +install: $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install archclean: diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile index 1e71382d413..0fea75dd4e3 100644 --- a/arch/i386/boot/Makefile +++ b/arch/i386/boot/Makefile @@ -100,5 +100,5 @@ zlilo: $(BOOTIMAGE) cp System.map $(INSTALL_PATH)/ if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi -install: $(BOOTIMAGE) +install: sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" diff --git a/arch/i386/boot/install.sh b/arch/i386/boot/install.sh index f17b40dfc0f..5e44c736eea 100644 --- a/arch/i386/boot/install.sh +++ b/arch/i386/boot/install.sh @@ -19,6 +19,20 @@ # $4 - default install path (blank if root directory) # +verify () { + if [ ! -f "$1" ]; then + echo "" 1>&2 + echo " *** Missing file: $1" 1>&2 + echo ' *** You need to run "make" before "make install".' 1>&2 + echo "" 1>&2 + exit 1 + fi +} + +# Make sure the files actually exist +verify "$2" +verify "$3" + # User may have a custom install script if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi -- cgit v1.2.3