]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
Makefile: Derive "PKGVERSION" from "git describe" by default
authorFam Zheng <famz@redhat.com>
Wed, 1 Jun 2016 09:44:21 +0000 (17:44 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jun 2016 12:14:39 +0000 (14:14 +0200)
commit67a1de0d195a6185c39b436159c9ffc7720bf979
tree85b406d7305a86f4b844ca8a824be209aceb1d6b
parent077de81a4c7e7064c850bb9ba9c5532ac7dd82b7
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>
Makefile
linux-user/main.c
qemu-img.c
qmp.c
scripts/create_config
vl.c