forked from pfsense/FreeBSD-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Thanks for the overwhelming response (which can be only summarized by…
… the word: "zilch"). I guess the only way to get people try and comment on these kind of things is to shove it down their throat.... ;) Anyway, here's a set of changes required for auto-generation of READMEs in ports directories. Necessary changes and additions of templates to the ports tree will follow shortly. Eventually I'll commit all the generated READMEs to the tree, but that will be in the rather distant future. For now, I encourage anyone with a -current systam and a matching ports tree to do a "make readmes" at the top level and see what they get. Next step will be to add pkg/{COMMENT,DESCR} to all the categories.
- Loading branch information
asami
authored and
asami
committed
Apr 1, 1996
1 parent
47b2937
commit 748b4a0
Showing
2 changed files
with
87 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.12 1996/03/24 00:41:10 wosch Exp $ | ||
|
||
.MAIN: all | ||
|
||
|
@@ -105,3 +105,46 @@ tags: _SUBDIRUSE | |
.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 | ||
|
||
PORTSDIR ?= /usr/ports | ||
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>: ' >> [email protected] | ||
.else | ||
@echo -n '<a href="'${entry}/README.html'">'"`cd ${entry}; make package-name`</a>: " >> [email protected] | ||
.endif | ||
.if exists(${entry}/pkg/COMMENT) | ||
@cat ${entry}/pkg/COMMENT >> [email protected] | ||
.else | ||
@echo "(no description)" >> [email protected] | ||
.endif | ||
.endfor | ||
@sort -t '>' +1 -2 [email protected] > [email protected] | ||
@cat ${README} | \ | ||
sed -e 's%%CATEGORY%%'`echo ${.CURDIR} | sed -e 's.*/\([^/]*\)$$\1'`'g' \ | ||
-e '/%%DESCR%%/r${.CURDIR}/pkg/DESCR' \ | ||
-e '/%%DESCR%%/d' \ | ||
-e '/%%SUBDIR%%/[email protected]' \ | ||
-e '/%%SUBDIR%%/d' \ | ||
> $@ | ||
@rm -f [email protected] [email protected] |