[coreboot] New patch to review for coreboot: 8f09719 superiotool: Add support for git-based version number

Guenter Roeck (linux@roeck-us.net) gerrit at coreboot.org
Fri Jun 29 21:31:09 CEST 2012

Guenter Roeck (linux at roeck-us.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1151


commit 8f09719f1a868c59b09e877ba40684a80836949b
Author: Guenter Roeck <linux at roeck-us.net>
Date:   Fri Jun 29 12:25:46 2012 -0700

    superiotool: Add support for git-based version number
    The superiotool Makefile extracts a version number from SVN. This does not work
    well with a git repository, and results in an empty version number. Expand it to
    use the git version number (using git describe) if the repository is not a svn
    Change-Id: Idf92c02753b28ef5bcdd3b6df4a08d79ae974434
    Signed-off-by: Guenter Roeck <linux at roeck-us.net>
 util/superiotool/Makefile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile
index e7d2f63..e141638 100644
--- a/util/superiotool/Makefile
+++ b/util/superiotool/Makefile
@@ -26,8 +26,13 @@ PREFIX  = /usr/local
 # Set the superiotool version string from the highest revision number
 # of the checked out superiotool files.
+ifneq ($(shell svnversion -cn .), exported)
 SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell svnversion -cn . \
-          | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
+	| sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
+SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell git describe 2>/dev/null)"'
 CFLAGS += -O2 -Wall -Wstrict-prototypes -Wundef -Wstrict-aliasing \
          -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)

More information about the coreboot mailing list