diff options
author | Fam Zheng <famz@redhat.com> | 2016-06-01 17:44:21 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-07 14:14:39 +0200 |
commit | 67a1de0d195a6185c39b436159c9ffc7720bf979 (patch) | |
tree | 85b406d7305a86f4b844ca8a824be209aceb1d6b /linux-user | |
parent | 077de81a4c7e7064c850bb9ba9c5532ac7dd82b7 (diff) | |
download | qemu-67a1de0d195a6185c39b436159c9ffc7720bf979.zip qemu-67a1de0d195a6185c39b436159c9ffc7720bf979.tar.gz qemu-67a1de0d195a6185c39b436159c9ffc7720bf979.tar.bz2 |
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 <famz@redhat.com>
Message-Id: <1464774261-648-3-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index b2bc6ab..8a11d02 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -17,6 +17,7 @@ * along with this program; if not, see <http://www.gnu.org/licenses/>. */ #include "qemu/osdep.h" +#include "qemu-version.h" #include <sys/mman.h> #include <sys/syscall.h> #include <sys/resource.h> |