Date: Fri, 22 Apr 2011 15:22:41 +0100 (IST) From: Florent Thoumie <flz@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/156575: bsd.port.mk: add INDEX_PORT, to support INDEX creation for a subset of the ports tree Message-ID: <201104221422.p3MEMfsD065039@ash.xbsd.org> Resent-Message-ID: <201104221450.p3MEo8YZ061096@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 156575 >Category: ports >Synopsis: bsd.port.mk: add INDEX_PORT, to support INDEX creation for a subset of the ports tree >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 22 14:50:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Florent Thoumie >Release: FreeBSD 8.2-RELEASE amd64 >Organization: >Environment: System: FreeBSD ash.xbsd.org 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: This is the first step to be able to do exp-runs on a defined set of ports (as opposed to the whole ports tree). >How-To-Repeat: >Fix: --- 0003-Add-INDEX_PORTS-to-create-an-index-file-for-a-comple.patch begins here --- >From 1788b74d557e72be8e8785e64013bd466a4dac6b Mon Sep 17 00:00:00 2001 From: Florent Thoumie <flz@xbsd.org> Date: Fri, 22 Apr 2011 12:59:36 +0100 --- Makefile | 8 ++++++-- Mk/bsd.port.mk | 10 ++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7606167..e6234de 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,10 @@ INDEX_SHELL= /rescue/sh INDEX_SHELL= /bin/sh .endif +.if !defined(INDEX_PORTS) +INDEX_PORTS=. +.endif + ${INDEXDIR}/${INDEXFILE}: @${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \ if [ "${INDEX_PRISTINE}" != "" ]; then \ @@ -108,9 +112,9 @@ ${INDEXDIR}/${INDEXFILE}: fi; \ tmpdir=`/usr/bin/mktemp -d -t index` || exit 1; \ trap "rm -rf $${tmpdir}; exit 1" 1 2 3 5 10 13 15; \ - ( cd ${.CURDIR} && make -j${INDEX_JOBS} INDEX_TMPDIR=$${tmpdir} BUILDING_INDEX=1 \ + ( cd ${.CURDIR}; for i in ${INDEX_PORTS}; do (cd $${i} && make -j${INDEX_JOBS} INDEX_TMPDIR=$${tmpdir} BUILDING_INDEX=1 \ __MAKE_SHELL=${INDEX_SHELL} \ - ECHO_MSG="${INDEX_ECHO_MSG}" describe ) || \ + ECHO_MSG="${INDEX_ECHO_MSG}" describe); done ) || \ (rm -rf $${tmpdir} ; \ if [ "${INDEX_QUIET}" = "" ]; then \ echo; \ diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index ca9d841..ec047fb 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -5638,8 +5638,14 @@ _DESCR=${DESCR} _DESCR=/dev/null . endif +. if defined(BUILDING_INDEX) && defined(INDEX_PORTS) +INDEX_OUT=${INDEX_TMPDIR}/${INDEXFILE}.desc.aggr +. else +INDEX_OUT=&1 +. endif + describe: - @${ECHO_CMD} -n "${PKGNAME}|${.CURDIR}|${PREFIX}|"; \ + @(${ECHO_CMD} -n "${PKGNAME}|${.CURDIR}|${PREFIX}|"; \ ${ECHO_CMD} -n ${COMMENT:Q}; \ ${ECHO_CMD} -n "|${_DESCR}|${MAINTAINER}|${CATEGORIES}|${_EXTRACT_DEPENDS}|${_PATCH_DEPENDS}|${_FETCH_DEPENDS}|${_BUILD_DEPENDS:O:u}|${_RUN_DEPENDS:O:u}|"; \ while read one two discard; do \ @@ -5651,7 +5657,7 @@ describe: break; \ ;; \ esac; \ - done < ${DESCR}; ${ECHO_CMD} + done < ${DESCR}; ${ECHO_CMD}) >>${INDEX_OUT} . endif www-site: -- 1.7.4.1 --- 0003-Add-INDEX_PORTS-to-create-an-index-file-for-a-comple.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104221422.p3MEMfsD065039>