Commit f1d28fb043b325dad8944647a52b20287e59d8a1
Committed by
Sam Ravnborg
1 parent
2e3646e51b
Exists in
master
and in
20 other branches
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>
Showing 1 changed file with 10 additions and 11 deletions Side-by-side Diff
Makefile
... | ... | @@ -309,8 +309,8 @@ |
309 | 309 | -fno-strict-aliasing -fno-common |
310 | 310 | AFLAGS := -D__ASSEMBLY__ |
311 | 311 | |
312 | -# Read KERNELRELEASE from .kernelrelease (if it exists) | |
313 | -KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) | |
312 | +# Read KERNELRELEASE from include/config/kernel.release (if it exists) | |
313 | +KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) | |
314 | 314 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
315 | 315 | |
316 | 316 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ |
... | ... | @@ -406,7 +406,6 @@ |
406 | 406 | config %config: scripts_basic outputmakefile FORCE |
407 | 407 | $(Q)mkdir -p include/linux include/config |
408 | 408 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
409 | - $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease | |
410 | 409 | |
411 | 410 | else |
412 | 411 | # =========================================================================== |
... | ... | @@ -714,7 +713,7 @@ |
714 | 713 | $(Q)$(MAKE) $(build)=$@ |
715 | 714 | |
716 | 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 | 717 | # to be used when executing for example make install or make modules_install |
719 | 718 | # |
720 | 719 | # Take the contents of any files called localversion* and the config |
721 | 720 | |
... | ... | @@ -748,9 +747,9 @@ |
748 | 747 | |
749 | 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 | 751 | kernelrelease = $(KERNELVERSION)$(localver-full) |
753 | -.kernelrelease: FORCE | |
752 | +include/config/kernel.release: include/config/auto.conf FORCE | |
754 | 753 | $(Q)rm -f $@ |
755 | 754 | $(Q)echo $(kernelrelease) > $@ |
756 | 755 | |
... | ... | @@ -771,7 +770,7 @@ |
771 | 770 | # and if so do: |
772 | 771 | # 1) Check that make has not been executed in the kernel src $(srctree) |
773 | 772 | # 2) Create the include2 directory, used for the second asm symlink |
774 | -prepare3: .kernelrelease | |
773 | +prepare3: include/config/kernel.release | |
775 | 774 | ifneq ($(KBUILD_SRC),) |
776 | 775 | @echo ' Using $(srctree) as source for kernel' |
777 | 776 | $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ |
... | ... | @@ -834,7 +833,7 @@ |
834 | 833 | ) |
835 | 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 | 837 | $(call filechk,version.h) |
839 | 838 | |
840 | 839 | # --------------------------------------------------------------------------- |
... | ... | @@ -930,7 +929,7 @@ |
930 | 929 | MRPROPER_DIRS += include/config include2 |
931 | 930 | MRPROPER_FILES += .config .config.old include/asm .version .old_version \ |
932 | 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 | 934 | # clean - Delete most, but leave enough to build external modules |
936 | 935 | # |
... | ... | @@ -1253,8 +1252,8 @@ |
1253 | 1252 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) |
1254 | 1253 | |
1255 | 1254 | kernelrelease: |
1256 | - $(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \ | |
1257 | - $(error kernelrelease not valid - run 'make *config' to update it)) | |
1255 | + $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \ | |
1256 | + $(error kernelrelease not valid - run 'make prepare' to update it)) | |
1258 | 1257 | kernelversion: |
1259 | 1258 | @echo $(KERNELVERSION) |
1260 | 1259 |