readmes
Tim Vanderhoek
t.vanderhoek at utoronto.ca
Thu May 22 19:02:26 PDT 2003
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/.*<//;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.
More information about the freebsd-stable
mailing list