]> rtime.felk.cvut.cz Git - jailhouse.git/blob - scripts/gen_version_h
arm: Remove cpuid from pending_irq
[jailhouse.git] / scripts / gen_version_h
1 #!/bin/sh
2 #
3 # Jailhouse, a Linux-based partitioning hypervisor
4 #
5 # Copyright (c) Siemens AG, 2014
6 #
7 # Authors:
8 #  Jan Kiszka <jan.kiszka@siemens.com>
9 #
10 # This work is licensed under the terms of the GNU GPL, version 2.  See
11 # the COPYING file in the top-level directory.
12 #
13
14 echo "/* Auto-generated - leave alone and don't commit! */"
15 echo ""
16
17 cd "$1" > /dev/null
18
19 if ! git rev-parse 2>/dev/null; then
20         version="`cat VERSION`"
21 else
22         describe="`git describe --long --dirty --match "v[0-9].[0-9]*"`"
23         version="`echo $describe | sed -e 's/\([^-]*\)-\(.*\)/\1 (\2)/'`"
24 fi
25
26 cd - > /dev/null
27
28 echo "#define JAILHOUSE_VERSION \"$version\""