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).
This commit is contained in:
parent
80afc7818f
commit
f9992608f9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=71366
24
Makefile
24
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)
|
||||
|
@ -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
|
||||
|
@ -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/&/\&/g' -e 's/>/\>/g' -e 's/</\</g'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user