From owner-freebsd-stable@FreeBSD.ORG Thu May 22 19:02:25 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9FF437B401; Thu, 22 May 2003 19:02:25 -0700 (PDT) Received: from tomts25-srv.bellnexxia.net (tomts25.bellnexxia.net [209.226.175.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 778BD43F75; Thu, 22 May 2003 19:02:24 -0700 (PDT) (envelope-from t.vanderhoek@utoronto.ca) Received: from localhost.nowhere ([64.231.120.82]) by tomts25-srv.bellnexxia.netESMTP <20030523020222.MXEY18025.tomts25-srv.bellnexxia.net@localhost.nowhere>; Thu, 22 May 2003 22:02:22 -0400 Received: from localhost.nowhere (localhost [127.0.0.1]) by localhost.nowhere (8.12.9/8.12.6) with ESMTP id h4N22LSe066706; Thu, 22 May 2003 22:02:21 -0400 (EDT) (envelope-from tim@localhost.nowhere) Received: (from tim@localhost) by localhost.nowhere (8.12.9/8.12.6/Submit) id h4N1rTE5066085; Thu, 22 May 2003 21:53:29 -0400 (EDT) Date: Thu, 22 May 2003 21:53:29 -0400 From: Tim Vanderhoek To: Kris Kennaway Message-ID: <20030523015329.GA50473@turquoise> References: <20030116123702.GA98828@emetex.ru> <20030116164448.C28170@mail.unixguru.nl> <20030118205428.GA57840@turquoise> <20030118213827.GA94870@sr.se> <20030118175005.A25165@p23.ecf> <20030214084450.GB826@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030214084450.GB826@rot13.obsecurity.org> User-Agent: Mutt/1.5.1i cc: Gunnar Flygt cc: freebsd-stable@FreeBSD.org cc: portmgr@FreeBSD.org cc: kris@FreeBSD.org cc: Eugene Subject: Re: readmes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 02:02:26 -0000 On Fri, Feb 14, 2003 at 12:44:50AM -0800, Kris Kennaway wrote: > On Sat, Jan 18, 2003 at 05:50:05PM -0500, Tim Vanderhoek wrote: > > On Sat, Jan 18, 2003 at 10:38:27PM +0100, Gunnar Flygt wrote: > > > > > > Actually it seems more that some of the pors have huge "include's" > > > as /usr/ports/devel/cdk as it includes the big maninfo.mk, or > > > > It seems that I had a stale /usr/ports/ directory and that's why > > I didn't get the error when I tried 'make readmes'. > > > > Okay, here's the fix for bsd.port.mk. This is the same fix that I > > used about 3 years ago for the do-package: target. > > > > Here's another patch for portmgr to review _in addition to_ the one > > in the previous email for bsd.port.subdir.mk. > > > > Please let me know if you see any more problems. Thanks, > > Oops, I forgot about this patch when I did the last bsd.port.mk run; > this code has now changed. Can you please revise the patch so it > again applies? I'll try and get it in by 4.8. Kris - Patches for bsd.port.mk and bsd.port.subdir.mk, as promised (but somewhat belated). One for bsd.port.mk to fix the 'readmes' problem. One for bsd.port.subdir.mk to fix the broken recursion target (which came up during the same thread three months ago). This stuff was all originally speed optimization to get 'make index' down to a reasonable time. Satoshi and I managed to get down to something like ten minutes, I think. I've noticed that over time a lot of the optimisations I've made have been undone. This is probably due to my complete failure to produce any useful comments explaining what the optimisations were. :-) Anyways, there's bits of stuff in bsd.port.mk these days that looks like they should be passed around in either .MAKEFLAGS (through the environment) or through ${__softMAKEFLAGS}. These include things such as: ${UID} ${_PORTDIRNAME} ${PKGINSTALLVER} ${LDCONFIG_PLIST} ${LDCONFIG_RUNLIST} Actually, the way that _PORTDIRNAME is set is inefficient. I think you may be able to use make's variable substitution rather than making a (slow) call to ${BASENAME}. Given that BSDPORTMKVERSION is stuck back in the year 2000, I suspect that SYSTEMVERSION may no longer be used. I couldn't find it in any port Makefiles. This isn't as important as it used to be since bsd.port.mk doesn't rely on recursive ${MAKE} processes as much anymore. All the same, I do measure a significant speed improvement for 'make readme'. It is probably worthwhile to fix these things. It would also yield a smaller improvement for 'make index' (since UID and PKGINSTALLVER could be passed through the environment - aka .MAKEFLAGS - in bsd.port.subdir.mk). However ... right before a release is not the time to fix those things (even though they are trivially fixable). These patches just fix the recursive target in bsd.port.subdir.mk and the readmes target in bsd.port.mk. --- ~bsd.port.mk Thu May 22 02:45:39 2003 +++ bsd.port.mk Thu May 22 21:00:53 2003 @@ -3969,26 +3969,27 @@ @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} ${.CURDIR}/README.html .endif ${.CURDIR}/README.html: @${ECHO_MSG} "===> Creating README.html for ${PKGNAME}" - @${SED} -e 's|%%PORT%%|'$$(${ECHO_CMD} ${.CURDIR} | \ + @__softMAKEFLAGS='${__softMAKEFLAGS:S/'/'\''/g}'; \ + ${SED} -e 's|%%PORT%%|'$$(${ECHO_CMD} ${.CURDIR} | \ ${SED} -e 's|.*/\([^/]*/[^/]*\)$$|\1|')'|g' \ -e 's|%%PKG%%|${PKGNAME}|g' \ -e 's|%%COMMENT%%|'"$$(${ECHO_CMD} ${COMMENT:Q})"'|' \ -e '/%%COMMENT%%/d' \ -e 's|%%DESCR%%|'"$$(${ECHO_CMD} ${DESCR} | \ ${SED} -e 's|${.CURDIR}/||')"'|' \ -e 's|%%EMAIL%%|'"$$(${ECHO_CMD} "${MAINTAINER}" | \ ${SED} -e 's/([^)]*)//;s/.*.*//')"'|g' \ -e 's|%%MAINTAINER%%|${MAINTAINER}|g' \ - -e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && ${MAKE} \ - ${__softMAKEFLAGS} pretty-print-www-site)"'|' \ - -e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && ${MAKE} \ - ${__softMAKEFLAGS} pretty-print-build-depends-list)"'|' \ - -e 's|%%RUN_DEPENDS%%|'"$$(cd ${.CURDIR} && ${MAKE} \ - ${__softMAKEFLAGS} pretty-print-run-depends-list)"'|' \ + -e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && eval ${MAKE} \ + $${__softMAKEFLAGS} pretty-print-www-site)"'|' \ + -e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} \ + $${__softMAKEFLAGS} pretty-print-build-depends-list)"'|' \ + -e 's|%%RUN_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} \ + $${__softMAKEFLAGS} pretty-print-run-depends-list)"'|' \ -e 's|%%TOP%%|'"$$(${ECHO_CMD} ${CATEGORIES} | \ ${SED} -e 's| .*||' -e 's|[^/]*|..|g')"'/..|' \ ${TEMPLATES}/README.port >> $@ # The following two targets require an up-to-date INDEX in ${PORTSDIR} --- ~bsd.port.subdir.mk Thu May 22 02:45:48 2003 +++ bsd.port.subdir.mk Thu May 22 21:12:32 2003 @@ -129,15 +129,17 @@ if [ "$$OK" = "" ]; then \ ${ECHO_MSG} "===> ${DIRPRFX}$${edir}"; \ cd ${.CURDIR}/$${edir}; \ ${MAKE} -B ${.TARGET:E:realinstall=install} \ DIRPRFX=${DIRPRFX}$$edir/; \ fi -${SUBDIR}:: ${SUBDIR:S/$/.all/} +.for _subdir in ${SUBDIR} +${_subdir}:: ${_subdir:S/$/.all/} +.endfor .endif .if !target(install) .if !target(beforeinstall) beforeinstall: .endif -- There are two types of tasks in life: those which become less urgent as time passes, and those which become more urgent. Rotating one's .signature file is a task of the latter type.