aboutsummaryrefslogtreecommitdiff
path: root/scripts/create_config
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-09-12 13:18:56 +0400
committerMarkus Armbruster <armbru@redhat.com>2016-09-19 17:32:21 +0200
commit3688d8c717927e7ecaa8c260bc9cc706e3dbef7e (patch)
tree5bd9176e8ee634fe950a375de04ef572b41ae423 /scripts/create_config
parente3571ae30cd26d19efd4554c25e32ef64d6a36b3 (diff)
downloadqemu-3688d8c717927e7ecaa8c260bc9cc706e3dbef7e.zip
qemu-3688d8c717927e7ecaa8c260bc9cc706e3dbef7e.tar.gz
qemu-3688d8c717927e7ecaa8c260bc9cc706e3dbef7e.tar.bz2
build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO}
There are better chances to find what went wrong at build time than a later assert in qmp_query_version Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20160912091913.15831-2-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/create_config')
-rwxr-xr-xscripts/create_config6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/create_config b/scripts/create_config
index 1dd6a35..e6929dd 100755
--- a/scripts/create_config
+++ b/scripts/create_config
@@ -7,7 +7,13 @@ while read line; do
case $line in
VERSION=*) # configuration
version=${line#*=}
+ major=$(echo "$version" | cut -d. -f1)
+ minor=$(echo "$version" | cut -d. -f2)
+ micro=$(echo "$version" | cut -d. -f3)
echo "#define QEMU_VERSION \"$version\""
+ echo "#define QEMU_VERSION_MAJOR $major"
+ echo "#define QEMU_VERSION_MINOR $minor"
+ echo "#define QEMU_VERSION_MICRO $micro"
;;
qemu_*dir=*) # qemu-specific directory configuration
name=${line%=*}