A quick hack to build the HTML version of the DocBook handbook -- partly

so I can check my progress, partly so that others can offer comments on
the result of the conversion.

See <URL:http://www.freebsd.org/~nik/handbook/book01.htm> for the first
results. Keep in mind that the conversion has not been fine tuned in any
way. That said, comments are welcome.
This commit is contained in:
Nik Clayton 1998-06-18 09:06:04 +00:00
parent bd9330d762
commit cf82da2a44
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=2962
3 changed files with 231 additions and 0 deletions
en/handbook
en_US.ISO8859-1/books/handbook
en_US.ISO_8859-1/books/handbook

77
en/handbook/Makefile Normal file
View file

@ -0,0 +1,77 @@
# Makefile to build the Handbook from DocBook source.
#
# Requires these ports from textproc
#
# docbook
# dsssl-docbook-modular
# html
# jade
#
# and probably one or two others.
#
# THIS IS A QUICK HACK (!) so that others can get an idea of how the
# Handbook will look after conversion. After typing "make", point your
# browser at book01.htm and read on. This is still very much a work in
# progress, and the final formatting will be considerably different.
#
# Eventually I expect most of this will be folded back into bsd.sgml.mk.
#
# Any comments or suggestions about the conversion process should be sent
# to nik@FreeBSD.ORG
#
DOCS= handbook.sgml
# ------------------------------------------------------------------------
#
# Transformation rules
#
# file.sgml --> file.html
#
# Examines file.sgml to determine the DTD in use. The DTD determines how
# the file will be converted to HTML.
.SUFFIXES: .sgml .html
SGMLNORM?= /usr/local/bin/sgmlnorm
HTMLCATALOG?= /usr/local/share/sgml/html/catalog
SGMLNORMFLAGS= -d -n -c ${HTMLCATALOG}
JADE?= /usr/local/bin/jade
DSL?= /usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl
DOCBOOKCATALOG?=/usr/local/share/sgml/docbook/3.0/catalog
JADECATALOG?= /usr/local/share/sgml/jade/catalog
JADEFLAGS?= -c ${DOCBOOKCATALOG} -c ${JADECATALOG} -d ${DSL} -t sgml
.sgml.html:
@DTD=`head -n 1 ${.IMPSRC} | perl -ne '/DTD (\w+)/; print $$1;'`; \
echo "${.IMPSRC} ($$DTD) --> ${.TARGET}"; \
case $$DTD in \
HTML) \
${SGMLNORM} ${SGMLNORMFLAGS} \
${.IMPSRC} > ${.TARGET}; \
;; \
DocBook) \
${JADE} ${JADEFLAGS} ${.IMPSRC}; \
mv ARTICLE-0001.html ${.TARGET}; \
;; \
*) \
echo "Don't know how to process $$DTD." \
;; \
esac
# ${SGMLNORM} ${SGMLNORMFLAGS} ${.IMPSRC} > ${.TARGET}
# ------------------------------------------------------------------------
#
# Targets
#
# If no target is specifed then .MAIN is made
.MAIN: all
#
# Build everything. Never completes, because handbook.html is never built
#
all: handbook.html

View file

@ -0,0 +1,77 @@
# Makefile to build the Handbook from DocBook source.
#
# Requires these ports from textproc
#
# docbook
# dsssl-docbook-modular
# html
# jade
#
# and probably one or two others.
#
# THIS IS A QUICK HACK (!) so that others can get an idea of how the
# Handbook will look after conversion. After typing "make", point your
# browser at book01.htm and read on. This is still very much a work in
# progress, and the final formatting will be considerably different.
#
# Eventually I expect most of this will be folded back into bsd.sgml.mk.
#
# Any comments or suggestions about the conversion process should be sent
# to nik@FreeBSD.ORG
#
DOCS= handbook.sgml
# ------------------------------------------------------------------------
#
# Transformation rules
#
# file.sgml --> file.html
#
# Examines file.sgml to determine the DTD in use. The DTD determines how
# the file will be converted to HTML.
.SUFFIXES: .sgml .html
SGMLNORM?= /usr/local/bin/sgmlnorm
HTMLCATALOG?= /usr/local/share/sgml/html/catalog
SGMLNORMFLAGS= -d -n -c ${HTMLCATALOG}
JADE?= /usr/local/bin/jade
DSL?= /usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl
DOCBOOKCATALOG?=/usr/local/share/sgml/docbook/3.0/catalog
JADECATALOG?= /usr/local/share/sgml/jade/catalog
JADEFLAGS?= -c ${DOCBOOKCATALOG} -c ${JADECATALOG} -d ${DSL} -t sgml
.sgml.html:
@DTD=`head -n 1 ${.IMPSRC} | perl -ne '/DTD (\w+)/; print $$1;'`; \
echo "${.IMPSRC} ($$DTD) --> ${.TARGET}"; \
case $$DTD in \
HTML) \
${SGMLNORM} ${SGMLNORMFLAGS} \
${.IMPSRC} > ${.TARGET}; \
;; \
DocBook) \
${JADE} ${JADEFLAGS} ${.IMPSRC}; \
mv ARTICLE-0001.html ${.TARGET}; \
;; \
*) \
echo "Don't know how to process $$DTD." \
;; \
esac
# ${SGMLNORM} ${SGMLNORMFLAGS} ${.IMPSRC} > ${.TARGET}
# ------------------------------------------------------------------------
#
# Targets
#
# If no target is specifed then .MAIN is made
.MAIN: all
#
# Build everything. Never completes, because handbook.html is never built
#
all: handbook.html

View file

@ -0,0 +1,77 @@
# Makefile to build the Handbook from DocBook source.
#
# Requires these ports from textproc
#
# docbook
# dsssl-docbook-modular
# html
# jade
#
# and probably one or two others.
#
# THIS IS A QUICK HACK (!) so that others can get an idea of how the
# Handbook will look after conversion. After typing "make", point your
# browser at book01.htm and read on. This is still very much a work in
# progress, and the final formatting will be considerably different.
#
# Eventually I expect most of this will be folded back into bsd.sgml.mk.
#
# Any comments or suggestions about the conversion process should be sent
# to nik@FreeBSD.ORG
#
DOCS= handbook.sgml
# ------------------------------------------------------------------------
#
# Transformation rules
#
# file.sgml --> file.html
#
# Examines file.sgml to determine the DTD in use. The DTD determines how
# the file will be converted to HTML.
.SUFFIXES: .sgml .html
SGMLNORM?= /usr/local/bin/sgmlnorm
HTMLCATALOG?= /usr/local/share/sgml/html/catalog
SGMLNORMFLAGS= -d -n -c ${HTMLCATALOG}
JADE?= /usr/local/bin/jade
DSL?= /usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl
DOCBOOKCATALOG?=/usr/local/share/sgml/docbook/3.0/catalog
JADECATALOG?= /usr/local/share/sgml/jade/catalog
JADEFLAGS?= -c ${DOCBOOKCATALOG} -c ${JADECATALOG} -d ${DSL} -t sgml
.sgml.html:
@DTD=`head -n 1 ${.IMPSRC} | perl -ne '/DTD (\w+)/; print $$1;'`; \
echo "${.IMPSRC} ($$DTD) --> ${.TARGET}"; \
case $$DTD in \
HTML) \
${SGMLNORM} ${SGMLNORMFLAGS} \
${.IMPSRC} > ${.TARGET}; \
;; \
DocBook) \
${JADE} ${JADEFLAGS} ${.IMPSRC}; \
mv ARTICLE-0001.html ${.TARGET}; \
;; \
*) \
echo "Don't know how to process $$DTD." \
;; \
esac
# ${SGMLNORM} ${SGMLNORMFLAGS} ${.IMPSRC} > ${.TARGET}
# ------------------------------------------------------------------------
#
# Targets
#
# If no target is specifed then .MAIN is made
.MAIN: all
#
# Build everything. Never completes, because handbook.html is never built
#
all: handbook.html