aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2013-10-07 21:32:30 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2013-10-07 21:32:30 +0000
commitb31efc497348913094899d01e5ab590d6cb6c611 (patch)
treef579f2042e188d1d5826465461f06337f7728b5b /Makefile
parente44133365075622bc72a7ec8e58bfac345024e6c (diff)
downloadports-b31efc497348913094899d01e5ab590d6cb6c611.tar.gz
ports-b31efc497348913094899d01e5ab590d6cb6c611.zip
- Fix 'make index' when system is built with WITHOUT_PORTSNAP by
falling back on the perl make_index if needed. With hat: portmgr Reported by: ade
Notes
Notes: svn path=/head/; revision=329740
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 696c9625dc34..d9b692075cc2 100644
--- a/Makefile
+++ b/Makefile
@@ -105,6 +105,12 @@ INDEX_SHELL= /bin/sh
INDEX_PORTS=.
.endif
+.if exists(/usr/libexec/make_index)
+MAKE_INDEX= /usr/libexec/make_index /dev/stdin
+.else
+MAKE_INDEX= perl ${.CURDIR}/Tools/make_index
+.endif
+
${INDEXDIR}/${INDEXFILE}:
@${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \
if [ "${INDEX_PRISTINE}" != "" ]; then \
@@ -135,7 +141,7 @@ ${INDEXDIR}/${INDEXFILE}:
echo; \
fi; \
exit 1); \
- cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; /usr/libexec/make_index /dev/stdin) | \
+ cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; ${MAKE_INDEX}) | \
sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e 's./..g' | \
sort -t '|' +1 -2 | \
sed -e 's../.g' > ${INDEXDIR}/${INDEXFILE}.tmp; \