On Wed, Jun 01, 2016 at 05:44:21PM +0800, Fam Zheng wrote: > 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 <f...@redhat.com> > --- > Makefile | 22 +++++++++++++++++++++- > linux-user/main.c | 1 + > qemu-img.c | 1 + > qmp.c | 1 + > scripts/create_config | 4 ---- > vl.c | 1 + > 6 files changed, 25 insertions(+), 5 deletions(-)
Reviewed-by: Daniel P. Berrange <berra...@redhat.com> Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|