From 67a1de0d195a6185c39b436159c9ffc7720bf979 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Wed, 1 Jun 2016 17:44:21 +0800 Subject: Makefile: Derive "PKGVERSION" from "git describe" by default Currently, if not specified in "./configure", QEMU_PKGVERSION will be empty. Write a rule in Makefile to generate a value from "git describe" combined with a possible git tree cleanness suffix, and write into a new header. $ cat qemu-version.h #define QEMU_PKGVERSION "-v2.6.0-557-gd6550e9-dirty" Include the header in .c files where the macro is referenced. It's not necessary to include it in all files, otherwise each time the content of the file changes, all sources have to be recompiled. Signed-off-by: Fam Zheng Message-Id: <1464774261-648-3-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini --- qmp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'qmp.c') diff --git a/qmp.c b/qmp.c index 3165f8726b..7df6543871 100644 --- a/qmp.c +++ b/qmp.c @@ -14,6 +14,7 @@ */ #include "qemu/osdep.h" +#include "qemu-version.h" #include "qemu/cutils.h" #include "monitor/monitor.h" #include "sysemu/sysemu.h" -- cgit v1.2.1