From: Mark Huang Date: Thu, 19 May 2005 18:56:14 +0000 (+0000) Subject: - merge revision 1.15 X-Git-Tag: plc-0_2-2~1 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c968c85f7b70da29c16df7a9c04ea23aaa83adbb;p=build.git - merge revision 1.15 date: 2005/05/18 15:18:43; author: mlhuang; state: Exp; lines: +6 -3 - set %_tmppath to current directory so that buildroots don't conflict - clean: remove all subpackage rpms --- diff --git a/Makerules b/Makerules index 0f219067..276f6730 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.15 2005/05/18 15:18:43 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..276f6730 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.15 2005/05/18 15:18:43 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