From 3688d8c717927e7ecaa8c260bc9cc706e3dbef7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 12 Sep 2016 13:18:56 +0400 Subject: build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-Id: <20160912091913.15831-2-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/create_config | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/create_config') diff --git a/scripts/create_config b/scripts/create_config index 1dd6a354f5..e6929dd61e 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%=*} -- cgit v1.2.1