1#ident "@(#)rules.htm	1.7 18/12/10 "
2###########################################################################
3# Written 2007 by J. Schilling
4###########################################################################
5#
6# Manual page to html converting rules
7#
8###########################################################################
9# Copyright (c) J. Schilling
10###########################################################################
11# The contents of this file are subject to the terms of the
12# Common Development and Distribution License, Version 1.0 only
13# (the "License").  You may not use this file except in compliance
14# with the License.
15#
16# See the file CDDL.Schily.txt in this distribution for details.
17# A copy of the CDDL is also available via the Internet at
18# http://www.opensource.org/licenses/cddl1.txt
19#
20# When distributing Covered Code, include this CDDL HEADER in each
21# file and include the License file CDDL.Schily.txt from this distribution.
22###########################################################################
23
24html:	$(MANFILE)
25	soelim $(MANFILE) | tbl | nroff -rh1 -u1 -Tlp -man - | col -x | \
26		man2html  -cgiurl '$$title.$$section.html' -compress -nodepage \
27		> $(MANFILE).html
28
29htmlxn:	$(MANFILE).html
30
31#
32# -rh1 sets number register 'h' to 1 to signal that we use man2html and
33# thus cannot reduce indentation in order to prevent man2html to make
34# related test big and bold as it thinks this are headlines.
35#
36$(MANFILE).html: $(MANFILE)
37	soelim $(MANFILE) | tbl | nroff -rh1 -u1 -Tlp -man - | col -x | \
38			(sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \
39			man2html  -cgiurl '../man$$section$$subsection/$$title.$$section$$subsection.html' -compress -nodepage; \
40			cat $(SRCROOT)/conf/post.html) | \
41			egrep -v 'HTML|BODY'> $(MANFILE).html
42
43$(MANFILE).dhtml: $(MANFILE)
44	soelim $(MANFILE) | tbl | nroff -rh1 -u1 -Tlp -mdoc - | col -x | \
45			(sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \
46			man2html  -cgiurl '../man$$section$$subsection/$$title.$$section$$subsection.html' -compress -nodepage; \
47			cat $(SRCROOT)/conf/post.html) | \
48			egrep -v 'HTML|BODY'> $(MANFILE).html
49
50htmlx:	$(MANFILE)
51	soelim $(MANFILE) | tbl | nroff -rh1 -u1 -Tlp -man - | col -x | \
52			(sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \
53			man2html  -cgiurl '$$title.$$section.html' -compress -nodepage; \
54			cat $(SRCROOT)/conf/post.html) | \
55			egrep -v 'HTML|BODY'> $(MANFILE).html
56