[Ovirt-devel] [PATCH] Use $(srcdir)/version, so this works from non-srcdir build, too.

Perry N. Myers pmyers at redhat.com
Mon Sep 8 12:39:48 UTC 2008


Jim Meyering wrote:
> Without this, a non-srcdir build in ovirt-node would fail.
> (btw, there are already significant differences in the various
> */release.mk files -- my guess is that this change can safely be
> applied to all)

Hmm.  release.mk should be identical in all repos with the exception of 
ovirt-docs which has sections of it commented out to prevent build 
failures (temp hack while ovirt-docs lacks a spec file)

Does this patch work where there is no srcdir?  i.e. ovirt-node-image, 
ovirt-appliance, etc?

Perry

>>From d77760811cf2251f3b56a30783656401948b5b31 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering at redhat.com>
> Date: Mon, 8 Sep 2008 13:33:07 +0200
> Subject: [PATCH] Use $(srcdir)/version, so this works from non-srcdir build, too.
> 
> Use '=', not ':=', so that VERSION can use the non-:= definition of srcdir.
> ---
>  release.mk |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/release.mk b/release.mk
> index b89bd86..9bc6972 100644
> --- a/release.mk
> +++ b/release.mk
> @@ -2,13 +2,13 @@
>  # It expects the including Makefile to define the "pkg_name" 
>  # variable, as well as a file named "version" in the current directory.
> 
> -ARCH		:= $(shell uname -i)
> -VERSION		:= $(shell awk '{ print $$1 }' version)
> -RELEASE		:= $(shell awk '{ print $$2 }' version)
> +ARCH		= $(shell uname -i)
> +VERSION		= $(shell awk '{ print $$1 }' $(srcdir)/version)
> +RELEASE		= $(shell awk '{ print $$2 }' $(srcdir)/version)
>  NEWVERSION	= $$(awk 'BEGIN { printf "%.2f", $(VERSION) + .01 }')
>  NEWRELEASE	= $$(($(RELEASE) + 1))
>  X		= $$(awk '{ split($$2,r,"."); \
> -                            printf("%d.%d\n", r[1], r[2]+1) }' version)
> +			  printf("%d.%d\n", r[1], r[2]+1) }' $(srcdir)/version)
>  git_head	= $$(git log -1 --pretty=format:%h)
>  GITRELEASE	= $(X).$$(date --utc +%Y%m%d%H%M)git$(git_head)
>  DIST		= $$(rpm --eval '%{dist}')

-- 
|=-        Red Hat, Engineering, Emerging Technologies, Boston        -=|
|=-                     Email: pmyers at redhat.com                      -=|
|=-         Office: +1 412 474 3552   Mobile: +1 703 362 9622         -=|
|=- GnuPG: E65E4F3D 88F9 F1C9 C2F3 1303 01FE 817C C5D2 8B91 E65E 4F3D -=|




More information about the ovirt-devel mailing list