From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH 1 of 5] Query rpm to find build directories Date: Tue, 07 Dec 2010 14:33:00 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com, xen-api@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User root@localhost.localdomain # Date 1291731529 18000 # Node ID b4ef59ed08a9a4c1387fd00cd79aec3398bca3f5 # Parent 3be1829b46b70a8ae4b2013fc20b71a76f3b55ee Query rpm to find build directories. Allows user with ~/.rpmmacros to build e.g. $ cat ~/.rpmmacros %_topdir /data/rpmbuild %_tmppath /data/tmp Signed-off-by: Ian Campbell diff -r 3be1829b46b7 -r b4ef59ed08a9 Makefile.in --- a/Makefile.in Tue Oct 12 12:15:54 2010 +0100 +++ b/Makefile.in Tue Dec 07 09:18:49 2010 -0500 @@ -211,8 +211,8 @@ cleanxen: $(MAKE) -C xsrpc clean $(MAKE) -C eventchn clean -RPM_SPECSDIR=/usr/src/redhat/SPECS -RPM_SOURCEDIR=/usr/src/redhat/SOURCES +RPM_SPECSDIR=$(shell rpm --eval='%_specdir') +RPM_SOURCEDIR=$(shell rpm --eval='%_sourcedir') XEN_RELEASE=xcp0.2 $(RPM_SPECSDIR)/xapi-libs.spec: xapi.spec.in diff -r 3be1829b46b7 -r b4ef59ed08a9 Makefile.xcp --- a/Makefile.xcp Tue Oct 12 12:15:54 2010 +0100 +++ b/Makefile.xcp Tue Dec 07 09:18:49 2010 -0500 @@ -6,9 +6,9 @@ MY_OUTPUT_DIR ?= $(CURDIR)/output MY_OBJ_DIR ?= $(CURDIR)/obj REPO ?= $(CURDIR) -RPM_SPECSDIR?=/usr/src/redhat/SPECS -RPM_SRPMSDIR?=/usr/src/redhat/SRPMS -RPM_SOURCEDIR?=/usr/src/redhat/SOURCES +RPM_SPECSDIR?=$(shell rpm --eval='%_specdir') +RPM_SRPMSDIR?=$(shell rpm --eval='%_srcrpmdir') +RPM_SOURCEDIR?=$(shell rpm --eval='%_sourcedir') XEN_RELEASE?=unknown endif