# # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # NOTES # # 1) You need to set DOCBOOK to point to the root of your docbook # files either by editing this Makefile or setting DOCBOOK # appropriately in your environment and using 'make -e'. The DocBook # XSL files are available on the web from: # http://sourceforge.net/project/showfiles.php?group_id=21935#files # The Makefile looks for the stylesheets in $DOCBOOK/XSL subdirectory. # # 2) You need xsltproc and xmllint in your path. If you are using the # Solaris distribution you should already have these tools installed # in /usr/bin. # # 3) The default target generates one big flat HTML file. Use the # 'make index.html' target to generate chunked HTML (which will # produce one HTML file per section, plus an index as index.html). # # 4) A 'make check' target is provided to check the xml source for # compliance with the docbook 4.4 DTD (provided as docbookx.dtd). # Since the xml provided here was generated from POD source there # are a few existing DTD errors. # # 5) The provided CSS file should be made available with the resulting # HTML. Feel free to edit it as you like, the default one provided # here gives the document an opensolaris.org look-and-feel. # DOCBOOK=SET_THIS_TO_THE_LOCATION_OF_YOUR_DOCBOOK_FILES XSLTPROC=xsltproc XMLLINT=xmllint XSLTPROC_OPTS= \ --nonet \ --stringparam html.stylesheet "format.css" \ --stringparam chunker.output.doctype-public \ "-//W3C//DTD HTML 4.01 Transitional//EN" \ --stringparam chunker.output.doctype-system \ "http://www.w3.org/TR/html4/loose.dtd" XSLT_DB2HTML=$(DOCBOOK)/html/docbook.xsl XSLT_DB2IDXHTML=$(DOCBOOK)/html/chunk.xsl ALLFILES= \ devref.xml FILES= \ devref.xml %.html:%.xml $(ALLFILES) $(XSLTPROC) $(XSLTPROC_OPTS) -o $@ $(XSLT_DB2HTML) $< all: $(FILES:%.xml=%.html) index.html: $(ALLFILES) $(XSLTPROC) $(XSLTPROC_OPTS) -o $@ $(XSLT_DB2IDXHTML) $(FILES) clean: -rm -f *.html check: $(XMLLINT) --valid --noout $(FILES)