diff --git a/Makefile b/Makefile index c3b324ed985e6..e7dd45a98b8d9 100644 --- a/Makefile +++ b/Makefile @@ -366,7 +366,7 @@ else # !mixed-build include $(srctree)/scripts/Kbuild.include # Read KERNELRELEASE from include/config/kernel.release (if it exists) -KERNELRELEASE = $(call read-file, include/config/kernel.release) +KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION @@ -1168,11 +1168,8 @@ vmlinux: vmlinux.o $(KBUILD_LDS) modpost # make sure no implicit rule kicks in $(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ; -ifeq ($(origin KERNELRELEASE),file) -filechk_kernel.release = $(srctree)/scripts/setlocalversion $(srctree) -else -filechk_kernel.release = echo $(KERNELRELEASE) -endif +filechk_kernel.release = \ + echo "$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" # Store (new) KERNELRELEASE string in include/config/kernel.release include/config/kernel.release: FORCE diff --git a/init/build-version b/init/build-version index 537d458150832..13c54ea1d12bb 100755 --- a/init/build-version +++ b/init/build-version @@ -3,8 +3,13 @@ prev_ver=$(cat .version 2>/dev/null) && ver=$(expr ${prev_ver} + 1 2>/dev/null) || -ver=1 - +#ver=1 +if [ X$prev_ver = "X" ] +then + ver=1 +else + ver=$prev_ver +fi echo ${ver} > .version echo ${ver} diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 5044224cf6714..7983aeac3f085 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -150,7 +150,7 @@ version=$KERNELRELEASE if [ -n "$KDEB_PKGVERSION" ]; then packageversion=$KDEB_PKGVERSION else - packageversion=$(${srctree}/scripts/setlocalversion --no-local ${srctree})-$($srctree/init/build-version) + packageversion=$($srctree/init/build-version) fi sourcename=${KDEB_SOURCENAME:-linux-upstream}