summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-12-04 17:17:48 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-12-04 17:17:48 +0000
commitf9992608f9cd9f5af9641b2aabd67573e2ccbaea (patch)
tree06875a37a4d36ed3bfa0d4e1109c122811581487
parentOn recent 5-CURRENT, there is no Perl wrapper. It is therefore possible (diff)
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).
Notes
Notes: svn path=/head/; revision=71366
-rw-r--r--Makefile24
-rw-r--r--Mk/bsd.port.mk9
-rw-r--r--Mk/bsd.port.subdir.mk5
3 files changed, 24 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index debb315ed61f..42168222339e 100644
--- a/Makefile
+++ b/Makefile
@@ -61,28 +61,28 @@ PORTSTOP= yes
.include <bsd.port.subdir.mk>
index:
- @rm -f ${.CURDIR}/INDEX
- @cd ${.CURDIR} && make ${.CURDIR}/INDEX
+ @rm -f ${.CURDIR}/${INDEXFILE}
+ @cd ${.CURDIR} && make ${.CURDIR}/${INDEXFILE}
-${.CURDIR}/INDEX:
- @echo -n "Generating INDEX - please wait.."; \
+${.CURDIR}/${INDEXFILE}:
+ @echo -n "Generating ${INDEXFILE} - please wait.."; \
export LOCALBASE=/nonexistentlocal; \
export X11BASE=/nonexistentx; \
cd ${.CURDIR} && make describe ECHO_MSG="echo > /dev/null" | \
perl ${.CURDIR}/Tools/make_index | \
- sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e "s,${LOCALBASE},/usr/local," -e "s,${X11BASE},/usr/X11R6," > INDEX
+ sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e "s,${LOCALBASE},/usr/local," -e "s,${X11BASE},/usr/X11R6," > ${INDEXFILE}
.if !defined(INDEX_NOSORT)
- @sed -e 's./..g' ${.CURDIR}/INDEX | \
+ @sed -e 's./..g' ${.CURDIR}/${INDEXFILE} | \
sort -t '|' +1 -2 | \
- sed -e 's../.g' > ${.CURDIR}/INDEX.tmp; \
- mv -f ${.CURDIR}/INDEX.tmp ${.CURDIR}/INDEX
+ sed -e 's../.g' > ${.CURDIR}/${INDEXFILE}.tmp; \
+ mv -f ${.CURDIR}/INDEX.tmp ${.CURDIR}/${INDEXFILE}
.endif
@echo " Done."
-print-index: ${.CURDIR}/INDEX
- @awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }' < ${.CURDIR}/INDEX
+print-index: ${.CURDIR}/${INDEXFILE}
+ @awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }' < ${.CURDIR}/${INDEXFILE}
-parallel: ${.CURDIR}/INDEX
+parallel: ${.CURDIR}/${INDEXFILE}
.if !defined(branch)
@echo "The parallel target requires a branch parameter,"
@echo "e.g.: \"make parallel branch=X\""
@@ -91,7 +91,7 @@ parallel: ${.CURDIR}/INDEX
.for dir in ${SUBDIR}
@echo "all: ${dir}-all"
.endfor
- @awk -F '|' '{me=$$1; here=$$2; bdep=$$8; rdep=$$9; split(here, tmp, "/"); if (bdep != "") { gsub("$$", ".tgz", bdep); gsub(" ", ".tgz ", bdep); } if (rdep != "") { gsub("$$", ".tgz", rdep); gsub(" ", ".tgz ", rdep); } print tmp[4] "-all: " me ".tgz"; print me ": " me ".tgz"; print me ".tgz: " bdep " " rdep; printf("\t@/var/portbuild/scripts/pdispatch ${branch} /var/portbuild/scripts/portbuild %s.tgz %s", me, here); if (bdep != "") printf(" %s", bdep); if (rdep != "") printf(" %s", rdep); printf("\n")}' < ${.CURDIR}/INDEX
+ @awk -F '|' '{me=$$1; here=$$2; bdep=$$8; rdep=$$9; split(here, tmp, "/"); if (bdep != "") { gsub("$$", ".tgz", bdep); gsub(" ", ".tgz ", bdep); } if (rdep != "") { gsub("$$", ".tgz", rdep); gsub(" ", ".tgz ", rdep); } print tmp[4] "-all: " me ".tgz"; print me ": " me ".tgz"; print me ".tgz: " bdep " " rdep; printf("\t@/var/portbuild/scripts/pdispatch ${branch} /var/portbuild/scripts/portbuild %s.tgz %s", me, here); if (bdep != "") printf(" %s", bdep); if (rdep != "") printf(" %s", rdep); printf("\n")}' < ${.CURDIR}/${INDEXFILE}
CVS?= cvs
.if defined(SUPHOST)
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 821d26e4a3d9..7e85fdeed06e 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 e7523af8a6b9..584d5213b5fc 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'