summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1997-01-13 02:17:00 +0000
committerSatoshi Asami <asami@FreeBSD.org>1997-01-13 02:17:00 +0000
commit5fc2fac469d1f882903d7a41f48928bf1e98a27b (patch)
treebc03c023f2da2fbb684773c73d0d4694107b16b9
parentMerge in rev. 1.245 and 1.246. (diff)
Sync everything up to 1.16.
Notes
Notes: svn path=/branches/RELENG_2_1_0/; revision=5330
-rw-r--r--Mk/bsd.port.subdir.mk127
1 files changed, 65 insertions, 62 deletions
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index 486f2da95429..3e629eb5fbd5 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -1,5 +1,5 @@
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
-# $Id: bsd.port.subdir.mk,v 1.11 1995/03/21 03:59:13 jkh Exp $
+# $Id: bsd.port.subdir.mk,v 1.11.4.2 1996/06/05 02:54:01 jkh Exp $
.MAIN: all
@@ -7,9 +7,9 @@
STRIP?= -s
.endif
-BINGRP?= bin
-BINOWN?= bin
-BINMODE?= 555
+.if !defined(OPSYS) # XXX !!
+OPSYS!= uname -s
+.endif
ECHO_MSG?= echo
@@ -22,16 +22,17 @@ _SUBDIRUSE: .USE
${ECHO_MSG} "===> ${DIRPRFX}$${entry} skipped"; \
fi; \
done; \
+ if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
+ edir=$${entry}.${MACHINE}; \
+ elif test -d ${.CURDIR}/$${entry}; then \
+ edir=$${entry}; \
+ else \
+ OK="false"; \
+ ${ECHO_MSG} "===> ${DIRPRFX}$${entry} non-existent"; \
+ fi; \
if [ "$$OK" = "" ]; then \
- if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
- ${ECHO_MSG} "===> ${DIRPRFX}$${entry}.${MACHINE}"; \
- edir=$${entry}.${MACHINE}; \
- cd ${.CURDIR}/$${edir}; \
- else \
- ${ECHO_MSG} "===> ${DIRPRFX}$$entry"; \
- edir=$${entry}; \
- cd ${.CURDIR}/$${edir}; \
- fi; \
+ ${ECHO_MSG} "===> ${DIRPRFX}$${edir}"; \
+ cd ${.CURDIR}/$${edir}; \
${MAKE} ${.TARGET:realinstall=install} \
DIRPRFX=${DIRPRFX}$$edir/; \
fi; \
@@ -45,49 +46,12 @@ ${SUBDIR}::
fi; \
${MAKE} all
-.if !target(all)
-all: _SUBDIRUSE
-.endif
-
-.if !target(fetch)
-fetch: _SUBDIRUSE
-.endif
-
-.if !target(fetch-list)
-fetch-list: _SUBDIRUSE
-.endif
-
-.if !target(package)
-package: _SUBDIRUSE
-.endif
-
-.if !target(extract)
-extract: _SUBDIRUSE
-.endif
-
-.if !target(configure)
-configure: _SUBDIRUSE
-.endif
-
-.if !target(build)
-build: _SUBDIRUSE
-.endif
-
-.if !target(clean)
-clean: _SUBDIRUSE
-.endif
-
-.if !target(depend)
-depend: _SUBDIRUSE
-.endif
-
-.if !target(describe)
-describe: _SUBDIRUSE
-.endif
-
-.if !target(reinstall)
-reinstall: _SUBDIRUSE
+.for __target in all fetch fetch-list package extract configure \
+ build clean depend describe reinstall tags checksum
+.if !target(__target)
+${__target}: _SUBDIRUSE
.endif
+.endfor
.if !target(install)
.if !target(beforeinstall)
@@ -101,10 +65,49 @@ afterinstall: realinstall
realinstall: beforeinstall _SUBDIRUSE
.endif
-.if !target(tags)
-tags: _SUBDIRUSE
-.endif
-
-.if !target(checksum)
-checksum: _SUBDIRUSE
-.endif
+.if !target(readmes)
+readmes: readme _SUBDIRUSE
+.endif
+
+.if !target(readme)
+readme:
+ @rm -f README.html
+ @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
+
+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
+.if exists(${entry}/pkg/COMMENT)
+ @cat ${entry}/pkg/COMMENT >> $@.tmp
+.else
+ @echo "(no description)" >> $@.tmp
+.endif
+.endfor
+ @sort -t '>' +1 -2 $@.tmp > $@.tmp2
+ @cat ${README} | \
+ sed -e 's%%CATEGORY%%'`echo ${.CURDIR} | sed -e 's.*/\([^/]*\)$$\1'`'g' \
+ -e '/%%DESCR%%/r${.CURDIR}/pkg/DESCR' \
+ -e '/%%DESCR%%/d' \
+ -e '/%%SUBDIR%%/r$@.tmp2' \
+ -e '/%%SUBDIR%%/d' \
+ > $@
+ @rm -f $@.tmp $@.tmp2