summaryrefslogtreecommitdiff
path: root/util/superiotool/Makefile
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-06-29 12:25:46 -0700
committerPatrick Georgi <patrick@georgi-clan.de>2012-07-06 10:21:03 +0200
commit3397ceff7b8a2453e4f045f32f2aaa5be1b2166d (patch)
tree66e40d01dfaaa475f9f80f011fc86e06c040fd3b /util/superiotool/Makefile
parent97de28da8af758b85c644b3dc151aeb743e13412 (diff)
downloadcoreboot-3397ceff7b8a2453e4f045f32f2aaa5be1b2166d.tar.xz
superiotool: Add support for git-based version number
The superiotool Makefile extracts a version string from SVN. This does not work with a git repository, and results in an empty version string. Use the output of 'git describe' as version string instead. Change-Id: Idf92c02753b28ef5bcdd3b6df4a08d79ae974434 Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-on: http://review.coreboot.org/1151 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'util/superiotool/Makefile')
-rw-r--r--util/superiotool/Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile
index e7d2f6329e..41625d31d1 100644
--- a/util/superiotool/Makefile
+++ b/util/superiotool/Makefile
@@ -24,13 +24,12 @@ CC = gcc
INSTALL = /usr/bin/install
PREFIX = /usr/local
-# Set the superiotool version string from the highest revision number
-# of the checked out superiotool files.
-SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell svnversion -cn . \
- | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
+# Set the superiotool version string to the output of 'git describe'.
+
+VERSION := -D'SUPERIOTOOL_VERSION="$(shell git describe 2>/dev/null)"'
CFLAGS += -O2 -Wall -Wstrict-prototypes -Wundef -Wstrict-aliasing \
- -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)
+ -Werror-implicit-function-declaration -ansi -pedantic $(VERSION)
LDFLAGS += -lz
OBJS = superiotool.o serverengines.o ali.o fintek.o ite.o nsc.o nuvoton.o \