Subject: Re: How to include src/doc/ROADMAP in our web pages
To: None <netbsd-docs@NetBSD.org>
From: Klaus Heinz <k.heinz.jul.sechs@onlinehome.de>
List: netbsd-docs
Date: 07/05/2006 18:26:05
--cWoXeonUoKmBZSoM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I wrote:

> I actually think it would be better to duplicate the file ROADMAP in
> htdocs. If changes really happen rarely this should be feasible, we
> could even provide a make-target for this and put a short note at the
> top of the file.

Next try (thanks to Rui Paulo for the hint about XInclude).

Apply the appended patch in htdocs/Goals, copy src/docs/ROADMAP to
htdocs/Goals and "make roadmap.html". People who do not have the
htdocs tools installed can take a look at:

  http://www.NetBSD.org/~heinz/roadmap.html

ROADMAP will live in two places, (src/doc/ROADMAP,
htdocs/Goals/ROADMAP) but must only be changed in src/doc/ROADMAP.

ROADMAP in htdocs will not have CVS tags of its own, because it is only
a copy without a need for version history. The existing tags get
automatically replaced for the HTML file roadmap.html and people
updating ROADMAP in htdocs must be carefule to run "make escape-cvs-tags"
before committing a new version.

ciao
     Klaus

--cWoXeonUoKmBZSoM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="roadmap.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	5 Jul 2006 16:03:20 -0000
@@ -1,6 +1,15 @@
 #	$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
+
+SRCS.roadmap+=	escape-cvs-tags
+
+ROADMAPTAGS=	NetBSD
+
+escape-cvs-tags:	ROADMAP
+.for tag in ${ROADMAPTAGS}
+	sed -e 's/^\(.*\)\$$\(${tag}.*\)\$$\(.*\)$$/\1%\2%\3/g' ROADMAP > ROADMAP.tmp && mv -f ROADMAP.tmp ROADMAP
+.endfor
 
 .include "../share/mk/web.site.mk"
--- /dev/null	2006-07-05 18:06:41.000000000 +0200
+++ roadmap.xml	2006-07-05 17:32:29.000000000 +0200
@@ -0,0 +1,19 @@
+<?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">
+<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>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ROADMAP"
+  parse="text" />
+</screen>
+
+</webpage>

--cWoXeonUoKmBZSoM--