Subject: How to include src/doc/ROADMAP in our web pages
To: None <netbsd-docs@NetBSD.org>
From: Klaus Heinz <k.heinz.jun.sechs@onlinehome.de>
List: netbsd-docs
Date: 06/09/2006 01:35:21
--zYM0uCDKw75PZbzx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi
attached is a patch for creating htdocs/Goals/roadmap.html.
In order for this to work, you need to have a directory tree with
sources for NetBSD-current on your machine (only for the single file
src/doc/ROADMAP :-/) and set CURRENTSRCDIR.htdocs to this directory
in your /etc/mk.conf.
I did not use NETBSDSRCDIR (from bsd.own.mk) because this may not be
a src tree for -current. On my machine it contains netbsd-3.
Since src/doc/ROADMAP will remain a simple text file, I chose <screen>
to include it verbatim in roadmap.xml because it represents this fact
better than <literallayout>, IMO.
The patch must be applied in /usr/htdocs/Goals/.
Opinions, suggestions?
ciao
Klaus
--zYM0uCDKw75PZbzx
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename=diff
Index: Makefile
===================================================================
RCS file: /cvsroot/htdocs/Goals/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile 14 Oct 2005 08:59:56 -0000 1.7
+++ Makefile 8 Jun 2006 23:11:52 -0000
@@ -1,6 +1,30 @@
# $NetBSD: Makefile,v 1.7 2005/10/14 08:59:56 rillig Exp $
XMLDOCS+= index interop portability redistribution
-XMLDOCS+= standards system
+XMLDOCS+= standards system roadmap
+
+# we need $MAKECONF early
+.include "../share/mk/web.prefs.mk"
+
+ROADMAP= ${CURRENTSRCDIR.htdocs}/doc/ROADMAP
+ROADMAP.version!= sed -ne 's/^.*\(\$$NetBSD.*\$$\).*$$/\1/p' ${ROADMAP} | sed -e 's/\$$/\$$\$$/g'
+ROADMAP.date!= sed -ne 's/^.*\(\$$Date.*\$$\).*$$/\1/p' ${ROADMAP} | sed -e 's/\$$/\$$\$$/g' ; echo
+
+roadmap.xml: check-CURRENTSRCDIR roadmap.head roadmap.tail ${ROADMAP}
+ @echo generating $@
+ @cat > ${@}.tmp roadmap.head ${ROADMAP} roadmap.tail && \
+ sed \
+ -e 's|\&|&|g' \
+ -e 's|@@NetBSD@@|${ROADMAP.version}|' \
+ -e 's|@@Date@@|${ROADMAP.date}|' < ${@}.tmp > ${@} && \
+ rm -r ${@}.tmp
+
+check-CURRENTSRCDIR: .PHONY
+.if !defined(CURRENTSRCDIR.htdocs)
+ @echo
+ @echo "Please set CURRENTSRCDIR.htdocs in ${MAKECONF} to where your sources of NetBSD-current reside."
+ @echo
+ @exit 1
+.endif
.include "../share/mk/web.site.mk"
--- /dev/null
+++ roadmap.tail 2006-06-09 00:26:24.000000000 +0200
@@ -0,0 +1,4 @@
+</screen>
+<!-- $NetBSD$ -->
+
+</webpage>
--- /dev/null
+++ roadmap.head 2006-06-09 00:26:18.000000000 +0200
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE webpage
+ PUBLIC "-//NetBSD//DTD Website-based NetBSD Extension//EN"
+ "http://www.NetBSD.org/XML/htdocs/lang/share/xml/website-netbsd.dtd">
+
+<webpage id="Goals-roadmap">
+<!-- $NetBSD$ -->
+<config param="desc" value="The NetBSD Project's roadmap"/>
+<config param="cvstag" value="@@NetBSD@@"/>
+<config param="rcsdate" value="@@Date@@"/>
+<head>
+<title>The NetBSD Project's roadmap</title>
+</head>
+
+<screen>
--zYM0uCDKw75PZbzx--