From: Mark Huang Date: Mon, 12 Apr 2004 19:56:02 +0000 (+0000) Subject: - disable annoying warning when make goes through its first pass and X-Git-Tag: chroot-breakout-hotfix-branch-point~16 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3697dd3c0d19e1b2a36052fc92b622c098a6aaeb;p=build.git - disable annoying warning when make goes through its first pass and SPECS/package.spec.in doesn't exist yet - add per-package "clean" target: "make -clean" or "make package= clean" --- diff --git a/Makerules b/Makerules index 85f978c9..5c3ceb61 100644 --- a/Makerules +++ b/Makerules @@ -32,7 +32,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# $Id: Makerules,v 1.4 2004/04/09 19:06:27 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.5 2004/04/09 19:37:19 alk-pl_rpm Exp $ # # Base cvsps and rpmbuild in the current directory @@ -163,7 +163,7 @@ endif # Build # -NVR := $(shell rpmquery $(RPMFLAGS) $(if $(DATE),--define "date $(DATE)") --specfile SPECS/$(notdir $(SPEC)).in | head -1) +NVR := $(shell rpmquery $(RPMFLAGS) $(if $(DATE),--define "date $(DATE)") --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) ARCH := $(shell rpm $(RPMFLAGS) --showrc | sed -ne 's/^build arch[ ]*:[ ]*\(.*\)/\1/p') all: RPMS/$(ARCH)/$(NVR).$(ARCH).rpm SRPMS/$(NVR).src.rpm @@ -182,4 +182,14 @@ SRPMS/$(NVR).src.rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros .rpmmacros: echo "%_topdir $(HOME)" > $@ -.PHONY: all +# Remove files generated by this package +clean: + rm -rf \ + BUILD/$(Base0) \ + RPMS/$(ARCH)/$(NVR).$(ARCH).rpm \ + SOURCES/$(Base0)* SOURCES/$(package)* \ + SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \ + SRPMS/$(NVR).src.rpm \ + .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE)) + +.PHONY: all clean diff --git a/Rules.mk b/Rules.mk index 85f978c9..5c3ceb61 100644 --- a/Rules.mk +++ b/Rules.mk @@ -32,7 +32,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# $Id: Makerules,v 1.4 2004/04/09 19:06:27 mlh-pl_rpm Exp $ +# $Id: Makerules,v 1.5 2004/04/09 19:37:19 alk-pl_rpm Exp $ # # Base cvsps and rpmbuild in the current directory @@ -163,7 +163,7 @@ endif # Build # -NVR := $(shell rpmquery $(RPMFLAGS) $(if $(DATE),--define "date $(DATE)") --specfile SPECS/$(notdir $(SPEC)).in | head -1) +NVR := $(shell rpmquery $(RPMFLAGS) $(if $(DATE),--define "date $(DATE)") --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) ARCH := $(shell rpm $(RPMFLAGS) --showrc | sed -ne 's/^build arch[ ]*:[ ]*\(.*\)/\1/p') all: RPMS/$(ARCH)/$(NVR).$(ARCH).rpm SRPMS/$(NVR).src.rpm @@ -182,4 +182,14 @@ SRPMS/$(NVR).src.rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros .rpmmacros: echo "%_topdir $(HOME)" > $@ -.PHONY: all +# Remove files generated by this package +clean: + rm -rf \ + BUILD/$(Base0) \ + RPMS/$(ARCH)/$(NVR).$(ARCH).rpm \ + SOURCES/$(Base0)* SOURCES/$(package)* \ + SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \ + SRPMS/$(NVR).src.rpm \ + .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE)) + +.PHONY: all clean