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

Jim Meyering jim at meyering.net
Mon Sep 8 12:36:57 UTC 2008


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)

>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}')
-- 
1.6.0.1.196.g01914




More information about the ovirt-devel mailing list