From owner-freebsd-ports Sun Oct 27 01:50:05 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA17042 for ports-outgoing; Sun, 27 Oct 1996 01:50:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA17033; Sun, 27 Oct 1996 01:50:03 -0800 (PST) Resent-Date: Sun, 27 Oct 1996 01:50:03 -0800 (PST) Resent-Message-Id: <199610270950.BAA17033@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-ports Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, obrien@NUXI.cs.ucdavis.edu Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [128.120.56.38]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id BAA16879 for ; Sun, 27 Oct 1996 01:47:10 -0800 (PST) Received: (from obrien@localhost) by relay.nuxi.com (8.7.5/8.6.12) id BAA26265; Sun, 27 Oct 1996 01:47:34 -0800 (PST) Message-Id: <199610270947.BAA26265@relay.nuxi.com> Date: Sun, 27 Oct 1996 01:47:34 -0800 (PST) From: "David E. O'Brien" Reply-To: obrien@NUXI.cs.ucdavis.edu To: FreeBSD-gnats-submit@freebsd.org Cc: obrien@Nuxi.com X-Send-Pr-Version: 3.2 Subject: ports/1902: additional clean targets for bsd.port.mk Sender: owner-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1902 >Category: ports >Synopsis: additional clean targets for bsd.port.mk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Oct 27 01:50:02 PST 1996 >Last-Modified: >Originator: David E. O'Brien >Organization: University of California, Davis >Release: FreeBSD 2.1.5-RELEASE i386 >Environment: based on bsd.port.mk from -current >Description: I would like to see additional clean targets added to bsd.port.mk. The first is "distclean" that would delete the DISTFILES and PATCHFILES, and would rmdir the dist subdir if there is one. This target is useful to recover some of the diskspace taken up by the distfile(s). It is even more useful when there is >1 distfile or patch files. The second target is "deepclean" that inaddition to "distclean" deletes the portball. This is useful as many times I build a port because the package either isn't avail, or doesn't match my system. After I've installed the port, I have no desire to keep the portball around. The only negitive port to this target, is after building this target, you are left in a cwd that doesn't exist anymore. But a simple ``cd'' to the next place you wanted to go anyway will take care of that. >How-To-Repeat: n/a >Fix: --- bsd.port.mk.orig Fri Oct 25 01:58:13 1996 +++ bsd.port.mk Sun Oct 27 01:34:55 1996 @@ -989,6 +989,34 @@ .endif .endif +.if !target(pre-distclean) +pre-distclean: + @${DO_NADA} +.endif + +.if !target(distclean) +distclean: pre-distclean clean + @${ECHO_MSG} "===> Dist cleaning for ${PKGNAME}" + @(cd ${DISTDIR}; \ + ${RM} -f ${DISTFILES} ${PATCHFILES}) +.if defined(DIST_SUBDIR) + @/bin/rmdir ${DISTDIR} +.endif +.endif + +.if !target(pre-deepclean) +pre-deepclean: + @${DO_NADA} +.endif + +.if !target(deepclean) +PORTDIRNAME!= /usr/bin/basename ${.CURDIR} +realclean: pre-deepclean distclean + @${ECHO_MSG} "===> Deep cleansing for ${PKGNAME}" + @(cd ${.CURDIR}/.. ; \ + ${RM} -rf ${PORTDIRNAME}) +.endif + # Prints out a list of files to fetch (useful to do a batch fetch) .if !target(fetch-list) >Audit-Trail: >Unformatted: