Date: Sun, 27 Apr 1997 14:23:23 +0200 (MET DST) From: Wolfram Schneider <wosch@apfel.de> To: ports@freebsd.org Subject: `make describe' improvement Message-ID: <199704271223.OAA05490@campa.panke.de>
next in thread | raw e-mail | index | archive | help
The following patch makes `make describe' three times faster. Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/src/share/mk/bsd.port.mk,v retrieving revision 1.256 diff -u -r1.256 bsd.port.mk --- bsd.port.mk 1997/04/21 00:24:51 1.256 +++ bsd.port.mk 1997/04/27 10:39:45 @@ -1545,23 +1545,29 @@ # .if !target(describe) describe: - @${ECHO} -n "${PKGNAME}|${.CURDIR}|" - @${ECHO} -n "${PREFIX}|" - @if [ -f ${COMMENT} ]; then \ + @${ECHO} -n "${PKGNAME}|${.CURDIR}|"; \ + ${ECHO} -n "${PREFIX}|"; \ + if [ -f ${COMMENT} ]; then \ ${ECHO} -n "`${CAT} ${COMMENT}`"; \ else \ ${ECHO} -n "** No Description"; \ - fi - @if [ -f ${DESCR} ]; then \ + fi; \ + if [ -f ${DESCR} ]; then \ ${ECHO} -n "|${DESCR}"; \ else \ ${ECHO} -n "|/dev/null"; \ - fi - @${ECHO} -n "|${MAINTAINER}|${CATEGORIES}|" - @cd ${.CURDIR} && ${ECHO} -n `make depends-list|sort -u` - @${ECHO} -n "|" - @cd ${.CURDIR} && ${ECHO} -n `make package-depends|sort -u` - @${ECHO} "" + fi; \ + ${ECHO} -n "|${MAINTAINER}|${CATEGORIES}|"; \ + case "A${FETCH_DEPENDS}B${BUILD_DEPENDS}C${LIB_DEPENDS}D${DEPENDS}E" in \ + ABCDE) ;; \ + *) cd ${.CURDIR} && ${ECHO} -n `make depends-list|sort -u`;; \ + esac; \ + ${ECHO} -n "|"; \ + case "A${RUN_DEPENDS}B${LIB_DEPENDS}C${DEPENDS}D" in \ + ABCD) ;; \ + *) cd ${.CURDIR} && ${ECHO} -n `make package-depends|sort -u`;; \ + esac; \ + ${ECHO} "" .endif .if !target(readmes)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704271223.OAA05490>