aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRyan Anderson <ryan@michonline.com>2005-07-31 04:57:49 -0400
committerSam Ravnborg <sam@mars.(none)>2005-08-10 15:11:23 -0400
commitaaebf4332018980fef4e601d1b5a6e52dd9e9ae4 (patch)
tree394ff78f08be95894fe941c752632dcb2e0a0ebf /Makefile
parentdbec486632d2303f5c0e75af7a8473fa4c4a145a (diff)
[PATCH] kbuild: automatically append a short string to the version based upon the git commit
If CONFIG_AUTO_LOCALVERSION is set, the user is using a git-based tree, and the current HEAD is not referred to by any tags in .git/refs/tags/, append -g and the first 8 characters of the commit to the version string. This makes it easier to use git-bisect, and/or to do a daily build, without trampling on your older, working builds, or accidentally setting up conflicting sets of modules. Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d01b004a2a0e..c6aae86a02cd 100644
--- a/Makefile
+++ b/Makefile
@@ -548,6 +548,26 @@ export KBUILD_IMAGE ?= vmlinux
548# images. Default is /boot, but you can set it to other values 548# images. Default is /boot, but you can set it to other values
549export INSTALL_PATH ?= /boot 549export INSTALL_PATH ?= /boot
550 550
551# If CONFIG_LOCALVERSION_AUTO is set, we automatically perform some tests
552# and try to determine if the current source tree is a release tree, of any sort,
553# or if is a pure development tree.
554#
555# A 'release tree' is any tree with a git TAG associated
556# with it. The primary goal of this is to make it safe for a native
557# git/CVS/SVN user to build a release tree (i.e, 2.6.9) and also to
558# continue developing against the current Linus tree, without having the Linus
559# tree overwrite the 2.6.9 tree when installed.
560#
561# Currently, only git is supported.
562# Other SCMs can edit scripts/setlocalversion and add the appropriate
563# checks as needed.
564
565
566ifdef CONFIG_LOCALVERSION_AUTO
567 localversion-auto := $(shell $(PERL) $(srctree)/scripts/setlocalversion $(srctree))
568 LOCALVERSION := $(LOCALVERSION)$(localversion-auto)
569endif
570
551# 571#
552# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory 572# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
553# relocations required by build roots. This is not defined in the 573# relocations required by build roots. This is not defined in the