- fix up templates location so that readmes should be functional.

- provide error location for failing recursive dependency computation.
- remove hard-coded limit on topdir, always try to use make package-name
and fall back on directory name otherwise.
This commit is contained in:
espie 1999-07-28 12:40:56 +00:00
parent caf377dcae
commit e5b3930ae6
2 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
FULL_REVISION=$$OpenBSD: bsd.port.mk,v 1.101 1999/07/28 00:25:38 espie Exp $$
FULL_REVISION=$$OpenBSD: bsd.port.mk,v 1.102 1999/07/28 12:40:56 espie Exp $$
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
#
@ -425,7 +425,7 @@ X11BASE?= ${DESTDIR}/usr/X11R6
DISTDIR?= ${PORTSDIR}/distfiles
_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
PACKAGES?= ${PORTSDIR}/packages
TEMPLATES?= ${PORTSDIR}/templates
TEMPLATES?= ${PORTSDIR}/infrastructure/templates
.if exists(${.CURDIR}/patches.${ARCH}-${OPSYS})
PATCHDIR?= ${.CURDIR}/patches.${ARCH}-${OPSYS}
@ -2088,7 +2088,8 @@ package-depends:
esac; \
if cd $$dir 2>/dev/null; then \
${ECHO} -n "$$pname "; \
${MAKE} package-name package-depends ${_DEPEND_THRU}; \
${MAKE} package-name package-depends ${_DEPEND_THRU} || \
${ECHO_MSG} "Error: problem in \"$$dir\"" >&2; \
else \
${ECHO_MSG} "Warning: \"$$dir\" non-existent -- @pkgdep registration incomplete" >&2; \
fi; \
@ -2297,7 +2298,8 @@ depends-list:
esac; \
if cd $$dir 2>/dev/null; then \
${ECHO} -n "$$pname "; \
${MAKE} package-name depends-list ${_DEPEND_THRU}; \
${MAKE} package-name depends-list ${_DEPEND_THRU} || \
${ECHO_MSG} "Error: problem in \"$$dir\"" >&2; \
else \
${ECHO_MSG} "Warning: \"$$dir\" non-existent" >&2; \
fi; \
@ -2388,6 +2390,8 @@ README.html:
-e '/%%PKG%%/d' \
-e '/%%COMMENT%%/r${PKGDIR}/COMMENT' \
-e '/%%COMMENT%%/d' \
-e '/%%DESCR%%/r${PKGDIR}/DESCR' \
-e '/%%DESCR%%/d' \
-e '/%%BUILD_DEPENDS%%/r$@.tmp1a' \
-e '/%%BUILD_DEPENDS%%/d' \
-e '/%%RUN_DEPENDS%%/r$@.tmp2a' \

View File

@ -1,5 +1,5 @@
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
# $OpenBSD: bsd.port.subdir.mk,v 1.7 1999/05/25 20:38:34 espie Exp $
# $OpenBSD: bsd.port.subdir.mk,v 1.8 1999/07/28 12:40:56 espie Exp $
# FreeBSD Id: bsd.port.subdir.mk,v 1.20 1997/08/22 11:16:15 asami Exp
#
# The include file <bsd.port.subdir.mk> contains the default targets
@ -114,7 +114,7 @@ PORTSDIR ?= /usr/opt
.else
PORTSDIR ?= /usr/ports
.endif
TEMPLATES ?= ${PORTSDIR}/templates
TEMPLATES ?= ${PORTSDIR}/infrastructure/templates
.if defined(PORTSTOP)
README= ${TEMPLATES}/README.top
.else
@ -125,11 +125,7 @@ README.html:
@echo "===> Creating README.html"
@> $@.tmp
.for entry in ${SUBDIR}
.if defined(PORTSTOP)
@echo -n '<a href="'${entry}/README.html'">${entry}</a>: ' >> $@.tmp
.else
@echo -n '<a href="'${entry}/README.html'">'"`cd ${entry}; make package-name`</a>: " >> $@.tmp
.endif
@echo -n '<dt><a href="'${entry}/README.html'">'"`cd ${entry} && make package-name 2>/dev/null||echo ${entry}`</a><dd>" >> $@.tmp
.if exists(${entry}/pkg/COMMENT)
@cat ${entry}/pkg/COMMENT >> $@.tmp
.else