From 6b22d3d6b4132b617766a55a60d308ff29b6d37b Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Thu, 9 Mar 2006 16:30:18 +0000 Subject: [PATCH] - building one RPM builds the rest, prevent make -j from running two rpmbuilds --- Rules.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Rules.mk b/Rules.mk index 3be8ca0a..c84f71da 100644 --- a/Rules.mk +++ b/Rules.mk @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2003-2006 The Trustees of Princeton University # -# $Id: Makerules,v 1.18 2005/12/15 17:02:07 mlhuang Exp $ +# $Id: Rules.mk,v 1.19 2006/03/08 21:25:46 mlhuang Exp $ # # Base rpmbuild in the current directory @@ -93,11 +93,17 @@ SOURCES/%.tar: SOURCES/% all: $(RPMS) $(SRPM) -# Build RPM -$(RPMS): %.rpm: $(SPECFILE) $(SOURCES) .rpmmacros +# Build RPMS +$(RPMS): $(SPECFILE) $(SOURCES) .rpmmacros mkdir -p BUILD RPMS $(RPMBUILD) $(RPMFLAGS) -bb $< +# Make the rest of the RPMS depend on the first one since building one +# builds them all. +ifneq ($(words $(RPMS)),1) +$(wordlist 2,$(words $(RPMS)),$(RPMS)): $(firstword $(RPMS)) +endif + # Build SRPM $(SRPM): $(SPECFILE) $(SOURCES) .rpmmacros mkdir -p SRPMS -- 2.47.0