From: Mark Huang Date: Wed, 18 May 2005 15:18:43 +0000 (+0000) Subject: - set %_tmppath to current directory so that buildroots don't conflict X-Git-Tag: planetlab-3_1-branch-point~1 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ba3a1b1183a27f01d613e373637b7a61165e0319;p=build.git - set %_tmppath to current directory so that buildroots don't conflict - clean: remove all subpackage rpms --- diff --git a/Makerules b/Makerules index 0f219067..6e0da0ca 100644 --- a/Makerules +++ b/Makerules @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2003-2005 The Trustees of Princeton University # -# $Id: Makefile,v 1.63 2005/04/11 14:46:16 mlhuang Exp $ +# $Id: Makerules,v 1.14 2005/05/04 19:13:14 mlhuang Exp $ # # Base cvsps and rpmbuild in the current directory @@ -142,7 +142,8 @@ endif ifeq ($(TAG),HEAD) RPMFLAGS += --define "date $(DATE)" endif -NVR := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) +PACKAGES := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null) +NVR := $(word 1,$(PACKAGES)) ARCH := $(shell rpmquery $(RPMFLAGS) --queryformat '%{ARCH}\n' --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) all: RPMS/$(ARCH)/$(NVR).$(ARCH).rpm SRPMS/$(NVR).src.rpm @@ -160,15 +161,17 @@ SRPMS/$(NVR).src.rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros # Base rpmbuild in the current directory .rpmmacros: echo "%_topdir $(HOME)" > $@ + echo "%_tmppath $(HOME)/tmp" >> $@ # Remove files generated by this package clean: rm -rf \ BUILD/$(Base0) \ - RPMS/$(ARCH)/$(NVR).$(ARCH).rpm \ + $(foreach subpackage,$(PACKAGES),RPMS/*/$(subpackage)*) \ SOURCES/$(Base0)* SOURCES/$(package)* \ SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \ SRPMS/$(NVR).src.rpm \ + tmp \ .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE)) .PHONY: all clean diff --git a/Rules.mk b/Rules.mk index 0f219067..6e0da0ca 100644 --- a/Rules.mk +++ b/Rules.mk @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2003-2005 The Trustees of Princeton University # -# $Id: Makefile,v 1.63 2005/04/11 14:46:16 mlhuang Exp $ +# $Id: Makerules,v 1.14 2005/05/04 19:13:14 mlhuang Exp $ # # Base cvsps and rpmbuild in the current directory @@ -142,7 +142,8 @@ endif ifeq ($(TAG),HEAD) RPMFLAGS += --define "date $(DATE)" endif -NVR := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) +PACKAGES := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null) +NVR := $(word 1,$(PACKAGES)) ARCH := $(shell rpmquery $(RPMFLAGS) --queryformat '%{ARCH}\n' --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) all: RPMS/$(ARCH)/$(NVR).$(ARCH).rpm SRPMS/$(NVR).src.rpm @@ -160,15 +161,17 @@ SRPMS/$(NVR).src.rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros # Base rpmbuild in the current directory .rpmmacros: echo "%_topdir $(HOME)" > $@ + echo "%_tmppath $(HOME)/tmp" >> $@ # Remove files generated by this package clean: rm -rf \ BUILD/$(Base0) \ - RPMS/$(ARCH)/$(NVR).$(ARCH).rpm \ + $(foreach subpackage,$(PACKAGES),RPMS/*/$(subpackage)*) \ SOURCES/$(Base0)* SOURCES/$(package)* \ SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \ SRPMS/$(NVR).src.rpm \ + tmp \ .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE)) .PHONY: all clean