# Mark Huang <mlhuang@cs.princeton.edu>
# 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
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
# 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
# Mark Huang <mlhuang@cs.princeton.edu>
# 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
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
# 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