diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-06-09 01:12:43 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-06-09 01:31:30 -0400 |
commit | f1d28fb043b325dad8944647a52b20287e59d8a1 (patch) | |
tree | de1e263125b6944d0c821537c81235f7cbdd1bf0 /Makefile | |
parent | 2e3646e51b2d6415549b310655df63e7e0d7a080 (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-- | Makefile | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -309,8 +309,8 @@ CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | |||
309 | -fno-strict-aliasing -fno-common | 309 | -fno-strict-aliasing -fno-common |
310 | AFLAGS := -D__ASSEMBLY__ | 310 | AFLAGS := -D__ASSEMBLY__ |
311 | 311 | ||
312 | # Read KERNELRELEASE from .kernelrelease (if it exists) | 312 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) |
313 | KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) | 313 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) |
314 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 314 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
315 | 315 | ||
316 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ | 316 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ |
@@ -406,7 +406,6 @@ export KBUILD_DEFCONFIG | |||
406 | config %config: scripts_basic outputmakefile FORCE | 406 | config %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 | ||
411 | else | 410 | else |
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 | ||
749 | localver-full = $(localver)$(localver-auto) | 748 | localver-full = $(localver)$(localver-auto) |
750 | 749 | ||
751 | # Store (new) KERNELRELASE string in .kernelrelease | 750 | # Store (new) KERNELRELASE string in include/config/kernel.release |
752 | kernelrelease = $(KERNELVERSION)$(localver-full) | 751 | kernelrelease = $(KERNELVERSION)$(localver-full) |
753 | .kernelrelease: FORCE | 752 | include/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 |
774 | prepare3: .kernelrelease | 773 | prepare3: include/config/kernel.release |
775 | ifneq ($(KBUILD_SRC),) | 774 | ifneq ($(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 | ) |
835 | endef | 834 | endef |
836 | 835 | ||
837 | include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE | 836 | include/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 \ | |||
930 | MRPROPER_DIRS += include/config include2 | 929 | MRPROPER_DIRS += include/config include2 |
931 | MRPROPER_FILES += .config .config.old include/asm .version .old_version \ | 930 | MRPROPER_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 | ||
1255 | kernelrelease: | 1254 | kernelrelease: |
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)) |
1258 | kernelversion: | 1257 | kernelversion: |
1259 | @echo $(KERNELVERSION) | 1258 | @echo $(KERNELVERSION) |
1260 | 1259 | ||