Skip site navigation (1)Skip section navigation (2)
Date:      03 Mar 2000 11:40:02 -0800
From:      asami@freebsd.org (Satoshi - Ports Wraith - Asami)
To:        "Matthew N. Dodd" <winter@jurai.net>
Cc:        "Chris D. Faulhaber" <jedgar@fxp.org>, freebsd-ports@freebsd.org
Subject:   Re: mod_php4 and other questions.
Message-ID:  <vqc3dq7kfl9.fsf@silvia.hip.berkeley.edu>
In-Reply-To: "Matthew N. Dodd"'s message of "Thu, 2 Mar 2000 20:24:33 -0500 (EST)"
References:  <Pine.BSF.4.21.0003022022490.690-100000@sasami.jurai.net>

next in thread | previous in thread | raw e-mail | index | archive | help
 * From: "Matthew N. Dodd" <winter@jurai.net>

 * 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vqc3dq7kfl9.fsf>