diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -338,8 +338,9 @@ AFLAGS := -D__ASSEMBLY__ | |||
338 | 338 | ||
339 | # Read KERNELRELEASE from .kernelrelease (if it exists) | 339 | # Read KERNELRELEASE from .kernelrelease (if it exists) |
340 | KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) | 340 | KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) |
341 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | ||
341 | 342 | ||
342 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE \ | 343 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ |
343 | ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ | 344 | ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ |
344 | 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 \ |
345 | HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 346 | HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
@@ -434,6 +435,7 @@ export KBUILD_DEFCONFIG | |||
434 | config %config: scripts_basic outputmakefile FORCE | 435 | config %config: scripts_basic outputmakefile FORCE |
435 | $(Q)mkdir -p include/linux | 436 | $(Q)mkdir -p include/linux |
436 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 437 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
438 | $(Q)$(MAKE) .kernelrelease | ||
437 | 439 | ||
438 | else | 440 | else |
439 | # =========================================================================== | 441 | # =========================================================================== |
@@ -784,12 +786,10 @@ endif | |||
784 | localver-full = $(localver)$(localver-auto) | 786 | localver-full = $(localver)$(localver-auto) |
785 | 787 | ||
786 | # Store (new) KERNELRELASE string in .kernelrelease | 788 | # Store (new) KERNELRELASE string in .kernelrelease |
787 | kernelrelease = \ | 789 | kernelrelease = $(KERNELVERSION)$(localver-full) |
788 | $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(localver-full) | ||
789 | .kernelrelease: FORCE | 790 | .kernelrelease: FORCE |
790 | $(Q)rm -f .kernelrelease | 791 | $(Q)rm -f $@ |
791 | $(Q)echo $(kernelrelease) > .kernelrelease | 792 | $(Q)echo $(kernelrelease) > $@ |
792 | $(Q)echo " Building kernel $(kernelrelease)" | ||
793 | 793 | ||
794 | 794 | ||
795 | # 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 |
@@ -899,7 +899,7 @@ define filechk_version.h | |||
899 | ) | 899 | ) |
900 | endef | 900 | endef |
901 | 901 | ||
902 | include/linux/version.h: $(srctree)/Makefile FORCE | 902 | include/linux/version.h: $(srctree)/Makefile .config FORCE |
903 | $(call filechk,version.h) | 903 | $(call filechk,version.h) |
904 | 904 | ||
905 | # --------------------------------------------------------------------------- | 905 | # --------------------------------------------------------------------------- |
@@ -1302,9 +1302,10 @@ checkstack: | |||
1302 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) | 1302 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) |
1303 | 1303 | ||
1304 | kernelrelease: | 1304 | kernelrelease: |
1305 | @echo $(KERNELRELEASE) | 1305 | $(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \ |
1306 | $(error kernelrelease not valid - run 'make *config' to update it)) | ||
1306 | kernelversion: | 1307 | kernelversion: |
1307 | @echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 1308 | @echo $(KERNELVERSION) |
1308 | 1309 | ||
1309 | # FIXME Should go into a make.lib or something | 1310 | # FIXME Should go into a make.lib or something |
1310 | # =========================================================================== | 1311 | # =========================================================================== |