aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-12-05 01:17:48 +0800
committerkris <kris@FreeBSD.org>2002-12-05 01:17:48 +0800
commitff038ae4eb92911ec7216bdead2625e027884f32 (patch)
treeaa34a676e2fcee155edbed28fa70489f4de2d967 /Mk
parent76e2aca9e3a1543a8ecec16ccf72f1acbb79bdb5 (diff)
downloadfreebsd-ports-graphics-ff038ae4eb92911ec7216bdead2625e027884f32.tar.gz
freebsd-ports-graphics-ff038ae4eb92911ec7216bdead2625e027884f32.tar.zst
freebsd-ports-graphics-ff038ae4eb92911ec7216bdead2625e027884f32.zip
Add the INDEXFILE variable, that defaults to INDEX-5 on 5.0 (500036) and
later, and INDEX on earlier systems. Use this in the 'make index' and associated targets. This is necessary to deal with the substantially different dependencies of ports between 4.x and 5.0 (e.g. ports that depend on perl).
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk9
-rw-r--r--Mk/bsd.port.subdir.mk5
2 files changed, 12 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 821d26e4a3d..7e85fdeed06 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -728,6 +728,11 @@ X11BASE?= ${DESTDIR}/usr/X11R6
LINUXBASE?= ${DESTDIR}/compat/linux
DISTDIR?= ${PORTSDIR}/distfiles
_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
+.if ${OSVERSION} >= 500036
+INDEXFILE?= INDEX-5
+.else
+INDEXFILE?= INDEX
+.endif
.if defined(USE_BZIP2)
EXTRACT_SUFX?= .tar.bz2
.elif defined(USE_ZIP)
@@ -3625,7 +3630,7 @@ pretty-print-build-depends-list:
.if defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || \
defined(LIB_DEPENDS) || defined(DEPENDS)
@${ECHO_CMD} -n 'This port requires package(s) "'
- @${ECHO_CMD} -n `${GREP} '^${PKGNAME}|' ${PORTSDIR}/INDEX | awk -F\| '{print $$8;}'`
+ @${ECHO_CMD} -n `${GREP} '^${PKGNAME}|' ${PORTSDIR}/${INDEXFILE} | awk -F\| '{print $$8;}'`
@${ECHO_CMD} '" to build.'
.endif
.endif
@@ -3634,7 +3639,7 @@ pretty-print-build-depends-list:
pretty-print-run-depends-list:
.if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) || defined(DEPENDS)
@${ECHO_CMD} -n 'This port requires package(s) "'
- @${ECHO_CMD} -n `${GREP} '^${PKGNAME}|' ${PORTSDIR}/INDEX | awk -F\| '{print $$9;}'`
+ @${ECHO_CMD} -n `${GREP} '^${PKGNAME}|' ${PORTSDIR}/${INDEXFILE} | awk -F\| '{print $$9;}'`
@${ECHO_CMD} '" to run.'
.endif
.endif
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index e7523af8a6b..584d5213b5f 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -205,6 +205,11 @@ README= ${TEMPLATES}/README.category
.endif
COMMENT?= ${.CURDIR}/pkg/COMMENT
DESCR?= ${.CURDIR}/pkg/DESCR
+.if ${OSVERSION} >= 500036
+INDEXFILE?= INDEX-5
+.else
+INDEXFILE?= INDEX
+.endif
HTMLIFY= sed -e 's/&/\&amp;/g' -e 's/>/\&gt;/g' -e 's/</\&lt;/g'