aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-09 01:12:43 -0400
committerSam Ravnborg <sam@mars.ravnborg.org>2006-06-09 01:31:30 -0400
commitf1d28fb043b325dad8944647a52b20287e59d8a1 (patch)
treede1e263125b6944d0c821537c81235f7cbdd1bf0 /Makefile
parent2e3646e51b2d6415549b310655df63e7e0d7a080 (diff)
kconfig: move .kernelrelease
This moves the .kernelrelease file into include/config directory. Remove its generation from the config step, if the config step doesn't leave a proper .config behind, it triggers a call to silentoldconfig. Instead its generation can be done via proper dependencies. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 10 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 4b996c8fb70a..3c55de99ed31 100644
--- a/Makefile
+++ b/Makefile
@@ -309,8 +309,8 @@ CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
309 -fno-strict-aliasing -fno-common 309 -fno-strict-aliasing -fno-common
310AFLAGS := -D__ASSEMBLY__ 310AFLAGS := -D__ASSEMBLY__
311 311
312# Read KERNELRELEASE from .kernelrelease (if it exists) 312# Read KERNELRELEASE from include/config/kernel.release (if it exists)
313KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) 313KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
314KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) 314KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
315 315
316export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ 316export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
@@ -406,7 +406,6 @@ export KBUILD_DEFCONFIG
406config %config: scripts_basic outputmakefile FORCE 406config %config: scripts_basic outputmakefile FORCE
407 $(Q)mkdir -p include/linux include/config 407 $(Q)mkdir -p include/linux include/config
408 $(Q)$(MAKE) $(build)=scripts/kconfig $@ 408 $(Q)$(MAKE) $(build)=scripts/kconfig $@
409 $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
410 409
411else 410else
412# =========================================================================== 411# ===========================================================================
@@ -714,7 +713,7 @@ $(vmlinux-dirs): prepare scripts
714 $(Q)$(MAKE) $(build)=$@ 713 $(Q)$(MAKE) $(build)=$@
715 714
716# Build the kernel release string 715# Build the kernel release string
717# The KERNELRELEASE is stored in a file named .kernelrelease 716# The KERNELRELEASE is stored in a file named include/config/kernel.release
718# to be used when executing for example make install or make modules_install 717# to be used when executing for example make install or make modules_install
719# 718#
720# Take the contents of any files called localversion* and the config 719# Take the contents of any files called localversion* and the config
@@ -748,9 +747,9 @@ endif
748 747
749localver-full = $(localver)$(localver-auto) 748localver-full = $(localver)$(localver-auto)
750 749
751# Store (new) KERNELRELASE string in .kernelrelease 750# Store (new) KERNELRELASE string in include/config/kernel.release
752kernelrelease = $(KERNELVERSION)$(localver-full) 751kernelrelease = $(KERNELVERSION)$(localver-full)
753.kernelrelease: FORCE 752include/config/kernel.release: include/config/auto.conf FORCE
754 $(Q)rm -f $@ 753 $(Q)rm -f $@
755 $(Q)echo $(kernelrelease) > $@ 754 $(Q)echo $(kernelrelease) > $@
756 755
@@ -771,7 +770,7 @@ PHONY += prepare-all
771# and if so do: 770# and if so do:
772# 1) Check that make has not been executed in the kernel src $(srctree) 771# 1) Check that make has not been executed in the kernel src $(srctree)
773# 2) Create the include2 directory, used for the second asm symlink 772# 2) Create the include2 directory, used for the second asm symlink
774prepare3: .kernelrelease 773prepare3: include/config/kernel.release
775ifneq ($(KBUILD_SRC),) 774ifneq ($(KBUILD_SRC),)
776 @echo ' Using $(srctree) as source for kernel' 775 @echo ' Using $(srctree) as source for kernel'
777 $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ 776 $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
@@ -834,7 +833,7 @@ define filechk_version.h
834 ) 833 )
835endef 834endef
836 835
837include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE 836include/linux/version.h: $(srctree)/Makefile include/config/kernel.release FORCE
838 $(call filechk,version.h) 837 $(call filechk,version.h)
839 838
840# --------------------------------------------------------------------------- 839# ---------------------------------------------------------------------------
@@ -930,7 +929,7 @@ CLEAN_FILES += vmlinux System.map \
930MRPROPER_DIRS += include/config include2 929MRPROPER_DIRS += include/config include2
931MRPROPER_FILES += .config .config.old include/asm .version .old_version \ 930MRPROPER_FILES += .config .config.old include/asm .version .old_version \
932 include/linux/autoconf.h include/linux/version.h \ 931 include/linux/autoconf.h include/linux/version.h \
933 .kernelrelease Module.symvers tags TAGS cscope* 932 Module.symvers tags TAGS cscope*
934 933
935# clean - Delete most, but leave enough to build external modules 934# clean - Delete most, but leave enough to build external modules
936# 935#
@@ -1253,8 +1252,8 @@ checkstack:
1253 $(PERL) $(src)/scripts/checkstack.pl $(ARCH) 1252 $(PERL) $(src)/scripts/checkstack.pl $(ARCH)
1254 1253
1255kernelrelease: 1254kernelrelease:
1256 $(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \ 1255 $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \
1257 $(error kernelrelease not valid - run 'make *config' to update it)) 1256 $(error kernelrelease not valid - run 'make prepare' to update it))
1258kernelversion: 1257kernelversion:
1259 @echo $(KERNELVERSION) 1258 @echo $(KERNELVERSION)
1260 1259