From owner-freebsd-ports Wed Apr 24 15:46:37 2002 Delivered-To: freebsd-ports@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id A3DE137B419 for ; Wed, 24 Apr 2002 15:46:29 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1920) id 30E3BAE255; Wed, 24 Apr 2002 15:44:54 -0700 (PDT) Date: Wed, 24 Apr 2002 15:44:54 -0700 From: Maxime Henrion To: freebsd-ports@FreeBSD.org Subject: patch to have make clean not recurse in ${PORTSDIR} Message-ID: <20020424224454.GM88736@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sgneBHv3152wZ8jf" Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --sgneBHv3152wZ8jf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Currently, if you do a ``make clean'' in /usr/ports, it will recurse through each port's dependencies and clean them too. This behaviour causes a lot of ports to be cleaned a lot of times instead of just one. Moreover, the processing of the dependencies eats a fair amount of CPU time, which slows things down even more (really). This can be avoided by doing a ``make NOCLEANDEPENDS=yes clean'' instead. The purpose of this patch is to make this the default when we are in ${PORTSDIR} since I don't think the recursing behaviour is of any use, and even if it was, the scope of this usefulness would probably be very small. Currently, there is no way to get back the recursing behaviour once this patch is applied, but that can be easily changed if we ever need to. I won't be surprised at all if I did this patch the wrong way, but I couldn't think of any other way to pass the NOCLEANDEPENDS=yes. :-) All comments are welcome. Thanks, Maxime PS: thanks to keep me in the Cc list, since I'm not subscribed to ports@. --sgneBHv3152wZ8jf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ports.diff" Index: Makefile =================================================================== RCS file: /home/ncvs/ports/Makefile,v retrieving revision 1.65 diff -u -p -r1.65 Makefile --- Makefile 23 Dec 2001 10:58:42 -0000 1.65 +++ Makefile 24 Apr 2002 22:18:00 -0000 @@ -52,6 +52,8 @@ SUBDIR += x11-servers SUBDIR += x11-toolkits SUBDIR += x11-wm +SUBDIR_ARGS= NOCLEANDEPENDS=yes + PORTSTOP= yes .include Index: Mk/bsd.port.subdir.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.subdir.mk,v retrieving revision 1.41 diff -u -p -r1.41 bsd.port.subdir.mk --- Mk/bsd.port.subdir.mk 23 Dec 2001 11:11:40 -0000 1.41 +++ Mk/bsd.port.subdir.mk 24 Apr 2002 22:17:46 -0000 @@ -21,6 +21,8 @@ # Each of the targets will execute the same target in the # subdirectories. # +# SUBDIR_ARGS Optional arguments to pass in ${MAKE} command line. +# # # +++ targets +++ # @@ -123,7 +125,7 @@ _SUBDIRUSE: .USE if [ "$$OK" = "" ]; then \ ${ECHO_MSG} "===> ${DIRPRFX}$${edir}"; \ cd ${.CURDIR}/$${edir}; \ - ${MAKE} -B ${.TARGET:E:realinstall=install} \ + ${MAKE} ${SUBDIR_ARGS} -B ${.TARGET:E:realinstall=install} \ DIRPRFX=${DIRPRFX}$$edir/; \ fi --sgneBHv3152wZ8jf-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message