From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b839o-0004Ul-6D for qemu-devel@nongnu.org; Wed, 01 Jun 2016 06:13:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b839l-0006Pw-W6 for qemu-devel@nongnu.org; Wed, 01 Jun 2016 06:13:47 -0400 Date: Wed, 1 Jun 2016 11:13:35 +0100 From: "Daniel P. Berrange" Message-ID: <20160601101335.GB3905@redhat.com> Reply-To: "Daniel P. Berrange" References: <1464774261-648-1-git-send-email-famz@redhat.com> <1464774261-648-3-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1464774261-648-3-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 2/2] Makefile: Derive "PKGVERSION" from "git describe" by default List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, Paolo Bonzini , qemu-block@nongnu.org, peter.maydell@linaro.org, eblake@redhat.com, lersek@redhat.com 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 > --- > 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 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 :|