Commit 9f0cc714 authored by krasimir's avatar krasimir
Browse files

[project @ 2005-04-29 13:09:27 by krasimir]

Small fixes that adds chm and HxS targets to the build system. The former is used
to build all documentation in HtmlHelp format while the letter uses HtmlHelp2 format.
parent 748c8c8d
......@@ -36,5 +36,7 @@ boot:
install:
install-docs:
html:
chm:
HxS:
# End of file
......@@ -31,5 +31,7 @@ boot:
install:
install-docs:
html:
chm:
HxS:
# End of file
......@@ -187,7 +187,7 @@ IncludeExampleDirsInBuild=NO
#
# Which ways should DocBook XML documents be built?
# options are: dvi ps pdf html
# options are: dvi ps pdf html chm HxS
#
XMLDocWays=
......
# -----------------------------------------------------------------------------
# $Id: package.mk,v 1.53 2005/04/15 18:13:34 sof Exp $
# $Id: package.mk,v 1.54 2005/04/29 13:09:28 krasimir Exp $
ifneq "$(PACKAGE)" ""
......@@ -361,7 +361,7 @@ ifneq "$(NO_HADDOCK_DOCS)" "YES"
HS_PPS = $(addsuffix .raw-hs, $(basename $(filter-out $(EXCLUDED_HADDOCK_SRCS), $(HS_SRCS))))
HTML_DIR = html
HTML_DIR = ../html/$(PACKAGE)
HTML_DOC = $(HTML_DIR)/haddock.css $(HTML_DIR)/haddock.js
ifneq "$(HS_PPS)" ""
......@@ -402,11 +402,15 @@ HTML_INSTALL_DIR = $(datadir)/html/libraries/$(PACKAGE)
install-docs :: $(HTML_DOC)
@$(INSTALL_DIR) $(HTML_INSTALL_DIR)
@for i in $(HTML_DIR)/*; do \
echo $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(HTML_INSTALL_DIR); \
$(INSTALL_DATA) $(INSTALL_OPTS) $$i $(HTML_INSTALL_DIR); \
@for i in $(XMLDocWays); do \
if [ $$i = "html" ]; then \
for i in $(HTML_DIR)/*; do \
echo $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(HTML_INSTALL_DIR); \
$(INSTALL_DATA) $(INSTALL_OPTS) $$i $(HTML_INSTALL_DIR); \
done; \
$(INSTALL_DATA) $(INSTALL_OPTS) $(PACKAGE).haddock $(HTML_INSTALL_DIR); \
fi \
done
$(INSTALL_DATA) $(INSTALL_OPTS) $(PACKAGE).haddock $(HTML_INSTALL_DIR)
endif # HS_PPS
endif # NO_HADDOCK_DOCS
......
......@@ -277,7 +277,15 @@ endif
$(XSLTPROC_OPTS) \
$(DIR_DOCBOOK_XSL)/htmlhelp/htmlhelp.xsl $<
# TODO: Detect hhc via autoconf
%-htmlhelp2/collection.HxC : %.xml
$(RM) -rf $(dir $@)
$(XSLTPROC) --stringparam base.dir $(dir $@) \
--stringparam use.id.as.filename 1 \
--stringparam manifest.in.base.dir 1 \
$(XSLTPROC_OPTS) \
$(DIR_DOCBOOK_XSL)/htmlhelp2/htmlhelp2.xsl $<
# TODO: Detect hhc & Hxcomp via autoconf
#
# Two obstacles here:
#
......@@ -290,6 +298,9 @@ endif
%.chm : %-htmlhelp/index.html
( cd $(dir $<) && if hhc htmlhelp.hhp ; then false ; else true ; fi ) || true
%.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 \
......
......@@ -19,7 +19,7 @@
# install-docs*
# clean* distclean* mostlyclean* maintainer-clean*
# tags*
# dvi ps (no info) FPTOOLS adds: pdf rtf html
# dvi ps (no info) FPTOOLS adds: pdf rtf html chm HxS
# check
#
# 3. Some of the above targets have a version that
......@@ -178,7 +178,7 @@ endif
# `TAGS'
# Update a tags table for this program.
#
# `dvi' `ps' `pdf' `html' `rtf'
# `dvi' `ps' `pdf' `html' `chm' `HxS' `rtf'
# Generate DVI/PS/PDF files for LaTeX/DocBook docs. Not everything is
# supported everywhere, but the intention is to standardise on DocBook
# producing all formats.
......@@ -844,7 +844,7 @@ endif
# TODO: The following could be an entry for an Obfuscated Makefile Contest...
ifneq "$(strip $(INSTALL_XML_DOC))" ""
ifneq "$(XMLDocWays)" ""
install-docs:: $(foreach i,$(XMLDocWays),$(INSTALL_XML_DOC)$(patsubst %.html-no-chunks,%.html,$(patsubst %.htmlhelp,%.chm,$(patsubst %.html,%/index.html,.$(i)))))
install-docs:: $(foreach i,$(XMLDocWays),$(INSTALL_XML_DOC)$(patsubst %.html-no-chunks,%.html,$(patsubst %.html,%/index.html,.$(i))))
@$(INSTALL_DIR) $(datadir)
@for i in $(XMLDocWays); do \
if [ $$i = "html" ]; then \
......@@ -853,12 +853,13 @@ install-docs:: $(foreach i,$(XMLDocWays),$(INSTALL_XML_DOC)$(patsubst %.html-no-
echo "( cd $(INSTALL_XML_DOC) && $(CP) * $(datadir)/html/$(INSTALL_XML_DOC) )" ; \
( cd $(INSTALL_XML_DOC) && $(CP) * $(datadir)/html/$(INSTALL_XML_DOC) ) ; \
else \
echo $(INSTALL_DATA) $(INSTALL_OPTS) $(INSTALL_XML_DOC)`echo .$$i | sed s/\.htmlhelp/.chm/ | sed s/\.html-no-chunks/.html/` $(datadir); \
$(INSTALL_DATA) $(INSTALL_OPTS) $(INSTALL_XML_DOC)`echo .$$i | sed s/\.htmlhelp/.chm/ | sed s/\.html-no-chunks/.html/` $(datadir); \
$(INSTALL_DIR) $(datadir)/doc; \
echo $(INSTALL_DATA) $(INSTALL_OPTS) $(INSTALL_XML_DOC)`echo .$$i | sed s/\.html-no-chunks/.html/` $(datadir)/doc; \
$(INSTALL_DATA) $(INSTALL_OPTS) $(INSTALL_XML_DOC)`echo .$$i | sed s/\.html-no-chunks/.html/` $(datadir)/doc; \
fi; \
if [ $$i = "html-no-chunks" ]; then \
echo $(CP) $(FPTOOLS_CSS_ABS) $(datadir); \
$(CP) $(FPTOOLS_CSS_ABS) $(datadir); \
echo $(CP) $(FPTOOLS_CSS_ABS) $(datadir)/doc; \
$(CP) $(FPTOOLS_CSS_ABS) $(datadir)/doc; \
fi \
done
endif
......@@ -951,7 +952,7 @@ show:
#
################################################################################
.PHONY: html html-no-chunks htmlhelp fo dvi ps pdf
.PHONY: html html-no-chunks chm HxS fo dvi ps pdf
ifneq "$(XML_DOC)" ""
......@@ -966,7 +967,8 @@ endif
XML_HTML = $(addsuffix /index.html,$(basename $(XML_DOC)))
XML_HTML_NO_CHUNKS = $(addsuffix .html,$(XML_DOC))
XML_HTMLHELP = $(addsuffix -htmlhelp/index.html,$(basename $(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))
......@@ -976,7 +978,8 @@ $(XML_HTML) $(XML_NO_CHUNKS_HTML) $(XML_FO) $(XML_DVI) $(XML_PS) $(XML_PDF) :: $
html :: $(XML_HTML)
html-no-chunks :: $(XML_HTML_NO_CHUNKS)
htmlhelp :: $(XML_HTMLHELP)
chm :: $(XML_CHM)
HxS :: $(XML_HxS)
fo :: $(XML_FO)
dvi :: $(XML_DVI)
ps :: $(XML_PS)
......@@ -1194,7 +1197,7 @@ INSTALL_TARGET = install
INSTALL_DOCS_TARGET = install-docs
endif
$(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean maintainer-clean $(INSTALL_TARGET) $(INSTALL_DOCS_TARGET) html ps dvi txt::
$(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean maintainer-clean $(INSTALL_TARGET) $(INSTALL_DOCS_TARGET) html chm HxS ps dvi txt::
@echo "------------------------------------------------------------------------"
@echo "===fptools== Recursively making \`$@' in $(SUBDIRS) ..."
@echo "PWD = $(shell pwd)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment