From owner-freebsd-ports Fri Mar 3 11:43: 1 2000 Delivered-To: freebsd-ports@freebsd.org Received: from m3.cs.berkeley.edu (m3.CS.Berkeley.EDU [128.32.45.179]) by hub.freebsd.org (Postfix) with ESMTP id 2131637B638 for ; Fri, 3 Mar 2000 11:42:55 -0800 (PST) (envelope-from asami@stampede.cs.berkeley.edu) Received: from silvia.hip.berkeley.edu (sji-ca1-183.ix.netcom.com [209.109.232.183]) by m3.cs.berkeley.edu (8.9.3/8.9.3) with ESMTP id LAA59269; Fri, 3 Mar 2000 11:42:03 -0800 (PST) (envelope-from asami@stampede.cs.berkeley.edu) Received: (from asami@localhost) by silvia.hip.berkeley.edu (8.9.3/8.6.9) id LAA08681; Fri, 3 Mar 2000 11:40:34 -0800 (PST) To: "Matthew N. Dodd" Cc: "Chris D. Faulhaber" , freebsd-ports@freebsd.org Subject: Re: mod_php4 and other questions. References: From: asami@freebsd.org (Satoshi - Ports Wraith - Asami) Date: 03 Mar 2000 11:40:02 -0800 In-Reply-To: "Matthew N. Dodd"'s message of "Thu, 2 Mar 2000 20:24:33 -0500 (EST)" Message-ID: Lines: 66 X-Mailer: Gnus v5.7/Emacs 20.5 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * From: "Matthew N. Dodd" * Anyone else feel like we need a 'post-clean' target? Something like this? === Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v retrieving revision 1.330 diff -u -r1.330 bsd.port.mk --- bsd.port.mk 2000/03/03 01:23:49 1.330 +++ bsd.port.mk 2000/03/03 19:36:41 @@ -2066,17 +2066,8 @@ # Cleaning up -.if !target(pre-clean) -pre-clean: - @${DO_NADA} -.endif - -.if !target(clean) -clean: pre-clean -.if !defined(NOCLEANDEPENDS) - @${MAKE} ${__softMAKEFLAGS} clean-depends -.endif - @${ECHO_MSG} "===> Cleaning for ${PKGNAME}" +.if !target(do-clean) +do-clean: @if [ -d ${WRKDIR} ]; then \ if [ -w ${WRKDIR} ]; then \ ${RM} -rf ${WRKDIR}; \ @@ -2084,6 +2075,21 @@ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \ fi; \ fi +.endif + +.if !target(clean) +clean: +.if !defined(NOCLEANDEPENDS) + @${MAKE} ${__softMAKEFLAGS} clean-depends +.endif + @${ECHO_MSG} "===> Cleaning for ${PKGNAME}" +.if target(pre-clean) + @${MAKE} ${__softMAKEFLAGS} pre-clean +.endif + @${MAKE} ${__softMAKEFLAGS} do-clean +.if target(post-clean) + @${MAKE} ${__softMAKEFLAGS} post-clean +.endif .endif .if !target(pre-distclean) === I changed the clean target to a skeleton and made it call clean-depends, pre-clean, do-clean (which does the actual cleaning) and then post-clean. (I could even let it join the _PORT_USE macro but I'm not sure if I'd want to clutter that macro even more....) Satoshi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message