Skip to content
Browse files

using dblatex for formatting printable docs

  • Loading branch information...
1 parent f4e9ab1 commit e822ca3182d1259567d788b24d882d26a17c42cf @simonmar committed Apr 23, 2009
Showing with 12 additions and 35 deletions.
  1. +1 −2 doc/config.mk.in
  2. +2 −1 doc/configure.ac
  3. +9 −32 doc/docbook-xml.mk
View
3 doc/config.mk.in
@@ -5,8 +5,7 @@ XSLTPROC = @XsltprocCmd@
XMLLINT = @XmllintCmd@
FOP = @FopCmd@
XMLTEX = @XmltexCmd@
-PDFXMLTEX = @PdfxmltexCmd@
-DVIPS = @DvipsCmd@
+DBLATEX = @DbLatexCmd@
DIR_DOCBOOK_XSL = @DIR_DOCBOOK_XSL@
View
3 doc/configure.ac
@@ -6,7 +6,8 @@ AC_CONFIG_SRCDIR([Makefile])
dnl ** check for DocBook toolchain
FP_CHECK_DOCBOOK_DTD
FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl])
-FP_PROG_FO_PROCESSOR
+
+AC_PATH_PROG(DbLatexCmd,dblatex)
AC_CONFIG_FILES([config.mk])
AC_OUTPUT
View
41 doc/docbook-xml.mk
@@ -18,7 +18,6 @@ XML_HTML = $(addsuffix /index.html,$(basename $(XML_DOC)))
XML_HTML_NO_CHUNKS = $(addsuffix .html,$(XML_DOC))
XML_CHM = $(addsuffix .chm,$(XML_DOC))
XML_HxS = $(addsuffix .HxS,$(XML_DOC))
-XML_FO = $(addsuffix .fo,$(XML_DOC))
XML_DVI = $(addsuffix .dvi,$(XML_DOC))
XML_PS = $(addsuffix .ps,$(XML_DOC))
XML_PDF = $(addsuffix .pdf,$(XML_DOC))
@@ -29,17 +28,16 @@ html :: $(XML_HTML)
html-no-chunks :: $(XML_HTML_NO_CHUNKS)
chm :: $(XML_CHM)
HxS :: $(XML_HxS)
-fo :: $(XML_FO)
dvi :: $(XML_DVI)
ps :: $(XML_PS)
pdf :: $(XML_PDF)
-CLEAN_FILES += $(XML_HTML_NO_CHUNKS) $(XML_FO) $(XML_DVI) $(XML_PS) $(XML_PDF)
+CLEAN_FILES += $(XML_HTML_NO_CHUNKS) $(XML_DVI) $(XML_PS) $(XML_PDF)
FPTOOLS_CSS = fptools.css
clean ::
- $(RM) -rf $(XML_DOC).out $(basename $(XML_DOC)) $(basename $(XML_DOC))-htmlhelp
+ $(RM) -rf $(XML_DOC).out $(basename $(XML_DOC)) $(basename $(XML_DOC))-htmlhelp $(XML_DOC).pdf $(XML_DOC).dvi $(XML_DOC).ps
validate ::
$(XMLLINT) --valid --noout $(XMLLINT_OPTS) $(XML_DOC).xml
@@ -97,34 +95,13 @@ endif
%.HxS : %-htmlhelp2/collection.HxC
( cd $(dir $<) && if Hxcomp -p collection.HxC -o ../$@ ; then false ; else true ; fi )
-%.fo : %.xml
- $(XSLTPROC) --output $@ \
- --stringparam draft.mode no \
- $(XSLTPROC_LABEL_OPTS) $(XSLTPROC_OPTS) \
- $(DIR_DOCBOOK_XSL)/fo/docbook.xsl $<
-
-ifeq "$(FOP)" ""
-ifneq "$(PDFXMLTEX)" ""
-%.pdf : %.fo
- $(PDFXMLTEX) $<
- if grep "LaTeX Warning: Label(s) may have changed.Rerun to get cross-references right." $(basename $@).log > /dev/null ; then \
- $(PDFXMLTEX) $< ; \
- $(PDFXMLTEX) $< ; \
- fi
-endif
-else
-%.ps : %.fo
- $(FOP) $(FOP_OPTS) -fo $< -ps $@
+ifneq "$(DBLATEX)" ""
+%.pdf : %.xml
+ $(DBLATEX) -tpdf $<
-%.pdf : %.fo
- $(FOP) $(FOP_OPTS) -fo $< -pdf $@
-endif
+%.dvi : %.xml
+ $(DBLATEX) -tdvi $<
-ifneq "$(XMLTEX)" ""
-%.dvi : %.fo
- $(XMLTEX) $<
- if grep "LaTeX Warning: Label(s) may have changed.Rerun to get cross-references right." $(basename $@).log > /dev/null ; then \
- $(XMLTEX) $< ; \
- $(XMLTEX) $< ; \
- fi
+%.ps : %.xml
+ $(DBLATEX) -tps $<
endif

0 comments on commit e822ca3

Please sign in to comment.
Something went wrong with that request. Please try again.