diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-04-23 13:05:45 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-04-23 13:05:45 +0000 |
commit | 4940ab7a2116110a26c78b515c290352dee084aa (patch) | |
tree | 96118c7f701e6de7a18ba388198fc1de95ad81bc /src/config/Options.lb | |
parent | 2c245ff70e85b86fe776640e43b92e3500b95d4a (diff) |
This patch hooks up git mirrored svn revisions and adds some
error checking to the svnrevision call.
If a .svn directory exists in the top level directory and the svnversion
utility is available, we use svnversion.
Otherwise, if a .git directory exists in the top level directory and the
git utility is available, we use git log.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4194 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/config/Options.lb')
-rw-r--r-- | src/config/Options.lb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config/Options.lb b/src/config/Options.lb index ee6ccb506e..a27b15ed8c 100644 --- a/src/config/Options.lb +++ b/src/config/Options.lb @@ -96,8 +96,11 @@ define OBJCOPY export always comment "Objcopy command" end + +# Try to determine svn revision first. +# If that fails, try last svn revision in git log. define COREBOOT_VERSION - default "2.0.0-r$(shell if [ -f `which svnversion` ]; then svnversion $(TOP); fi)" + default "2.0.0-r$(shell if [ -d $(TOP)/.svn -a -f `which svnversion` ]; then svnversion $(TOP); else if [ -d $(TOP)/.git -a -f `which git` ]; then git --git-dir=/$(TOP)/.git log|grep git-svn-id|cut -f 2 -d@|cut -f 1 -d' '|sort -g|tail -1; fi; fi)" export always format "\"%s\"" comment "coreboot version" |