aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-16 14:19:04 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-16 14:19:04 -0500
commit9d8d5a284e11e45953ad1f12a5bf1ebc18eefb75 (patch)
tree4a0f07486932b5e6a5d52dbd2ada9d4a912b24a0 /Makefile
parent4a8e4a270b89030bdeb09d2f8cef7cfe9a50e54d (diff)
parentdf9df036d356078679a60135fba65f79cd6153d0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 15 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 673148e07603..34d6176dfcba 100644
--- a/Makefile
+++ b/Makefile
@@ -106,12 +106,13 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
106$(if $(KBUILD_OUTPUT),, \ 106$(if $(KBUILD_OUTPUT),, \
107 $(error output directory "$(saved-output)" does not exist)) 107 $(error output directory "$(saved-output)" does not exist))
108 108
109.PHONY: $(MAKECMDGOALS) 109.PHONY: $(MAKECMDGOALS) cdbuilddir
110$(MAKECMDGOALS) _all: cdbuilddir
110 111
111$(filter-out _all,$(MAKECMDGOALS)) _all: 112cdbuilddir:
112 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ 113 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
113 KBUILD_SRC=$(CURDIR) \ 114 KBUILD_SRC=$(CURDIR) \
114 KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@ 115 KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $(MAKECMDGOALS)
115 116
116# Leave processing to above invocation of make 117# Leave processing to above invocation of make
117skip-makefile := 1 118skip-makefile := 1
@@ -337,8 +338,9 @@ AFLAGS := -D__ASSEMBLY__
337 338
338# Read KERNELRELEASE from .kernelrelease (if it exists) 339# Read KERNELRELEASE from .kernelrelease (if it exists)
339KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) 340KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
341KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
340 342
341export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE \ 343export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
342 ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ 344 ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
343 CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ 345 CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \
344 HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 346 HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
@@ -433,6 +435,7 @@ export KBUILD_DEFCONFIG
433config %config: scripts_basic outputmakefile FORCE 435config %config: scripts_basic outputmakefile FORCE
434 $(Q)mkdir -p include/linux 436 $(Q)mkdir -p include/linux
435 $(Q)$(MAKE) $(build)=scripts/kconfig $@ 437 $(Q)$(MAKE) $(build)=scripts/kconfig $@
438 $(Q)$(MAKE) .kernelrelease
436 439
437else 440else
438# =========================================================================== 441# ===========================================================================
@@ -542,7 +545,7 @@ export INSTALL_PATH ?= /boot
542# makefile but the arguement can be passed to make if needed. 545# makefile but the arguement can be passed to make if needed.
543# 546#
544 547
545MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) 548MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
546export MODLIB 549export MODLIB
547 550
548 551
@@ -783,12 +786,10 @@ endif
783localver-full = $(localver)$(localver-auto) 786localver-full = $(localver)$(localver-auto)
784 787
785# Store (new) KERNELRELASE string in .kernelrelease 788# Store (new) KERNELRELASE string in .kernelrelease
786kernelrelease = \ 789kernelrelease = $(KERNELVERSION)$(localver-full)
787 $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(localver-full)
788.kernelrelease: FORCE 790.kernelrelease: FORCE
789 $(Q)rm -f .kernelrelease 791 $(Q)rm -f $@
790 $(Q)echo $(kernelrelease) > .kernelrelease 792 $(Q)echo $(kernelrelease) > $@
791 $(Q)echo " Building kernel $(kernelrelease)"
792 793
793 794
794# Things we need to do before we recursively start building the kernel 795# Things we need to do before we recursively start building the kernel
@@ -898,7 +899,7 @@ define filechk_version.h
898 ) 899 )
899endef 900endef
900 901
901include/linux/version.h: $(srctree)/Makefile FORCE 902include/linux/version.h: $(srctree)/Makefile .config FORCE
902 $(call filechk,version.h) 903 $(call filechk,version.h)
903 904
904# --------------------------------------------------------------------------- 905# ---------------------------------------------------------------------------
@@ -1301,9 +1302,10 @@ checkstack:
1301 $(PERL) $(src)/scripts/checkstack.pl $(ARCH) 1302 $(PERL) $(src)/scripts/checkstack.pl $(ARCH)
1302 1303
1303kernelrelease: 1304kernelrelease:
1304 @echo $(KERNELRELEASE) 1305 $(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \
1306 $(error kernelrelease not valid - run 'make *config' to update it))
1305kernelversion: 1307kernelversion:
1306 @echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) 1308 @echo $(KERNELVERSION)
1307 1309
1308# FIXME Should go into a make.lib or something 1310# FIXME Should go into a make.lib or something
1309# =========================================================================== 1311# ===========================================================================