summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-04-04 14:20:32 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-04-04 14:20:32 +0200
commit8f2c6a3d2b513e64f680e7e9a70d1e068b71110a (patch)
tree2cd7facc579bfe2c268567a35e8322f178b692dc /Makefile
parent4856aee6a85e50ce73a9d8a2b827766454faf033 (diff)
parenta17aee8d86956f0e6071489f37d45a8f264dabdb (diff)
downloadbarebox-8f2c6a3d2b513e64f680e7e9a70d1e068b71110a.tar.gz
barebox-8f2c6a3d2b513e64f680e7e9a70d1e068b71110a.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile61
1 files changed, 2 insertions, 59 deletions
diff --git a/Makefile b/Makefile
index b15c8cee8c..c322dd4486 100644
--- a/Makefile
+++ b/Makefile
@@ -744,68 +744,11 @@ PHONY += $(barebox-dirs)
$(barebox-dirs): prepare scripts
$(Q)$(MAKE) $(build)=$@
-# Build the kernel release string
-#
-# The KERNELRELEASE value built here is stored in the file
-# include/config/kernel.release, and is used when executing several
-# make targets, such as "make install" or "make modules_install."
-#
-# The eventual kernel release string consists of the following fields,
-# shown in a hierarchical format to show how smaller parts are concatenated
-# to form the larger and final value, with values coming from places like
-# the Makefile, kernel config options, make command line options and/or
-# SCM tag information.
-#
-# $(KERNELVERSION)
-# $(VERSION) eg, 2
-# $(PATCHLEVEL) eg, 6
-# $(SUBLEVEL) eg, 18
-# $(EXTRAVERSION) eg, -rc6
-# $(localver-full)
-# $(localver)
-# localversion* (all localversion* files)
-# $(CONFIG_LOCALVERSION) (from kernel config setting)
-# $(localver-auto) (only if CONFIG_LOCALVERSION_AUTO is set)
-# ./scripts/setlocalversion (SCM tag, if one exists)
-# $(LOCALVERSION) (from make command line if provided)
-#
-# Note how the final $(localver-auto) string is included *only* if the
-# kernel config option CONFIG_LOCALVERSION_AUTO is selected. Also, at the
-# moment, only git is supported but other SCMs can edit the script
-# scripts/setlocalversion and add the appropriate checks as needed.
-
-nullstring :=
-space := $(nullstring) # end of line
-
-___localver = $(objtree)/localversion* $(srctree)/localversion*
-__localver = $(sort $(wildcard $(___localver)))
-# skip backup files (containing '~')
-_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
-
-localver = $(subst $(space),, \
- $(shell cat /dev/null $(_localver)) \
- $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
-
-# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
-# and if the SCM is know a tag from the SCM is appended.
-# The appended tag is determined by the SCM used.
-#
-# Currently, only git is supported.
-# Other SCMs can edit scripts/setlocalversion and add the appropriate
-# checks as needed.
-ifdef CONFIG_LOCALVERSION_AUTO
- _localver-auto = $(shell $(CONFIG_SHELL) \
- $(srctree)/scripts/setlocalversion $(srctree))
- localver-auto = $(LOCALVERSION)$(_localver-auto)
-endif
-
-localver-full = $(localver)$(localver-auto)
-
# Store (new) KERNELRELASE string in include/config/kernel.release
-kernelrelease = $(KERNELVERSION)$(localver-full)
+localversion = $(shell $(srctree)/scripts/setlocalversion $(srctree))
include/config/kernel.release: include/config/auto.conf FORCE
$(Q)rm -f $@
- $(Q)echo $(kernelrelease) > $@
+ $(Q)echo $(KERNELVERSION)$(localversion) > $@
Doxyfile.version: include/config/auto.conf FORCE
$(Q)rm -f $@