diff options
author | kris <kris@FreeBSD.org> | 2007-08-08 03:46:04 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2007-08-08 03:46:04 +0000 |
commit | 0aed0939f4fd7f64eb185f1fad39d8ab09325fad (patch) | |
tree | 5a80fae520fd09a0374ef30d2f451db99a816a48 /Mk | |
parent | 3dbc99ae3bae0d9a381d880afd4569f013158f17 (diff) | |
download | FreeBSD-ports-0aed0939f4fd7f64eb185f1fad39d8ab09325fad.zip FreeBSD-ports-0aed0939f4fd7f64eb185f1fad39d8ab09325fad.tar.gz |
* Shuffle some important variable definitions to early in the file,
notably PORTSDIR. The previous commit introduced a use-before-define
with respect to this variable, which broke things like portmaster.
* Drop support for COMMENTFILE and a vestigial remnant of NetBSD support.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 22 | ||||
-rw-r--r-- | Mk/bsd.port.subdir.mk | 46 |
2 files changed, 30 insertions, 38 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index c484a5f..7f5260e 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1089,6 +1089,17 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # Most port authors should not need to understand anything after this point. # +# These need to be absolute since we don't know how deep in the ports +# tree we are and thus can't go relative. They can, of course, be overridden +# by individual Makefiles or local system make configuration. +PORTSDIR?= /usr/ports +LOCALBASE?= /usr/local +X11BASE?= ${LOCALBASE} +LINUXBASE?= /compat/linux +DISTDIR?= ${PORTSDIR}/distfiles +_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} +INDEXDIR?= ${PORTSDIR} + .include "${PORTSDIR}/Mk/bsd.commands.mk" # @@ -1294,16 +1305,6 @@ PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION} DISTNAME?= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX} -# These need to be absolute since we don't know how deep in the ports -# tree we are and thus can't go relative. They can, of course, be overridden -# by individual Makefiles or local system make configuration. -PORTSDIR?= /usr/ports -LOCALBASE?= /usr/local -X11BASE?= ${LOCALBASE} -LINUXBASE?= /compat/linux -DISTDIR?= ${PORTSDIR}/distfiles -_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} -INDEXDIR?= ${PORTSDIR} INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/} DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} @@ -2300,7 +2301,6 @@ COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ .undef NO_PACKAGE .endif -COMMENTFILE?= ${PKGDIR}/pkg-comment DESCR?= ${PKGDIR}/pkg-descr PLIST?= ${PKGDIR}/pkg-plist PKGINSTALL?= ${PKGDIR}/pkg-install diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk index 0a3cecb..40d0dac 100644 --- a/Mk/bsd.port.subdir.mk +++ b/Mk/bsd.port.subdir.mk @@ -40,6 +40,21 @@ # Search for ports using either 'make search key=<keyword>' # or 'make search name=<keyword>'. +PORTSDIR?= /usr/ports +TEMPLATES?= ${PORTSDIR}/Templates +.if defined(PORTSTOP) +README= ${TEMPLATES}/README.top +.else +README= ${TEMPLATES}/README.category +.endif +MOVEDDIR?= ${PORTSDIR} +MOVEDFILE?= MOVED + +# XXX Are these needed here? DESCR was set wrong for a few years +MASTERDIR?= ${.CURDIR} +PKGDIR?= ${MASTERDIR} +DESCR?= ${PKGDIR}/pkg-descr + .include "${PORTSDIR}/Mk/bsd.commands.mk" .MAIN: all @@ -66,6 +81,9 @@ OSVERSION!= ${SYSCTL} -n kern.osreldate .endif .endif +INDEXDIR?= ${PORTSDIR} +INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/} + UID!= ${ID} -u .if exists(${LOCALBASE}/sbin/pkg_info) PKG_INFO?= ${LOCALBASE}/sbin/pkg_info @@ -249,28 +267,6 @@ readme: @${MAKE} README.html .endif -.if (${OPSYS} == "NetBSD") -PORTSDIR ?= /usr/opt -.else -PORTSDIR ?= /usr/ports -.endif -TEMPLATES ?= ${PORTSDIR}/Templates -.if defined(PORTSTOP) -README= ${TEMPLATES}/README.top -.else -README= ${TEMPLATES}/README.category -.endif -COMMENTFILE?= ${.CURDIR}/pkg/COMMENT -DESCR?= ${.CURDIR}/pkg/DESCR -INDEXDIR?= ${PORTSDIR} -.if ${OSVERSION} >= 500036 -INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/} -.else -INDEXFILE?= INDEX -.endif -MOVEDDIR?= ${PORTSDIR} -MOVEDFILE?= MOVED - HTMLIFY= ${SED} -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g' package-name: @@ -298,12 +294,8 @@ README.html: .if defined(COMMENT) @${ECHO_CMD} "${COMMENT}" | ${HTMLIFY} > $@.tmp4 .else -.if exists(${COMMENTFILE}) - @${HTMLIFY} ${COMMENTFILE} > $@.tmp4 -.else @> $@.tmp4 .endif -.endif @${CAT} ${README} | \ ${SED} -e 's/%%CATEGORY%%/'"`basename ${.CURDIR}`"'/g' \ -e '/%%COMMENT%%/r$@.tmp4' \ @@ -415,7 +407,7 @@ _PORTSEARCH= \ break; \ }\ } \ - if (toprint == 1 ) disp[fields[d[i]]] = 1; \ + if (toprint == 1 ) disp[fields[d[i]]] = 1; \ } \ } \ { \ |