aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2013-10-08 05:32:30 +0800
committerbdrewery <bdrewery@FreeBSD.org>2013-10-08 05:32:30 +0800
commitc28390824a2e6cee9831139c143bc0d1b750496d (patch)
treef579f2042e188d1d5826465461f06337f7728b5b /Makefile
parent95207e85bfb4daf0f2b2d385b2ea51f62ba6f754 (diff)
downloadfreebsd-ports-gnome-c28390824a2e6cee9831139c143bc0d1b750496d.tar.gz
freebsd-ports-gnome-c28390824a2e6cee9831139c143bc0d1b750496d.tar.zst
freebsd-ports-gnome-c28390824a2e6cee9831139c143bc0d1b750496d.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
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; \