The following patch cleans up doc/book/Makefile after the svnbook left
the repository. There are also some other unrelated stuff which could
need some tweaking, but I'll come back to that if the patch is accepted.
[[[
Clean up doc/book/Makefile after the svnbook was moved out of the
repository in r13125. It now builds misc-docs without errors.
* doc/book/Makefile
(Renamed variables):
BOOK_TOP to DOC_TOP
BOOK_HTML_XSLTPROC_OPTS to DOC_HTML_XSLTPROC_OPTS
BOOK_PDF_XSLTPROC_OPTS to DOC_PDF_XSLTPROC_OPTS
BOOK_PS_XSLTPROC_OPTS to DOC_PS_XSLTPROC_OPTS
(Deleted variables): BOOK_HTML_CHUNK_DIR, BOOK_DIR, BOOK_HTML_TARGET,
BOOK_HTML_CHUNK_TARGET, BOOK_PDF_TARGET, BOOK_PS_TARGET,
BOOK_FO_TARGET, BOOK_XML_SOURCE, BOOK_VERSION_SOURCE,
BOOK_ALL_SOURCE, BOOK_IMAGES, BOOK_INSTALL_DIR
(install): Removed install-book target.
(all-html): Removed book-html and book-html-chunk targets.
(all-pdf): Removed book-pdf target.
(all-ps): Removed book-ps target.
(all-misc-docs): Removed book-ps target.
(clean): Removed book-clean target.
(all-book, install-book, $(BOOK_VERSION_SOURCE), book-version,
book-html, $(BOOK_HTML_TARGET), book-html-chunk,
$(BOOK_HTML_CHUNK_TARGET), book-pdf, book-ps, $(BOOK_PDF_TARGET),
$(BOOK_PS_TARGET), $(BOOK_INSTALL_DIR), install-book-html,
install-book-html-chunk, install-book-pdf, install-book-ps,
book-clean): Deleted these targets.
]]]
Index: doc/book/Makefile
===================================================================
--- doc/book/Makefile (revision 13317)
+++ doc/book/Makefile (working copy)
@@ -6,21 +6,9 @@
SHELL = /bin/sh
SVNVERSION = svnversion
-BOOK_TOP = .
-BOOK_HTML_CHUNK_DIR = $(BOOK_DIR)/html-chunk
-BOOK_DIR = ${BOOK_TOP}/book
-BOOK_HTML_TARGET = $(BOOK_DIR)/svn-book.html
-BOOK_HTML_CHUNK_TARGET = $(BOOK_HTML_CHUNK_DIR)/index.html # index.html is created last
-BOOK_PDF_TARGET = $(BOOK_DIR)/svn-book.pdf
-BOOK_PS_TARGET = $(BOOK_DIR)/svn-book.ps
-BOOK_FO_TARGET = $(BOOK_DIR)/svn-book.fo
-BOOK_XML_SOURCE = $(BOOK_DIR)/book.xml
-BOOK_VERSION_SOURCE = $(BOOK_DIR)/version.xml
-BOOK_ALL_SOURCE = $(BOOK_DIR)/*.xml
-BOOK_IMAGES = $(BOOK_DIR)/images/*.png
-BOOK_INSTALL_DIR = $(INSTALL_DIR)/book
+DOC_TOP = .
-MDOCS_DIR = ${BOOK_TOP}/misc-docs
+MDOCS_DIR = ${DOC_TOP}/misc-docs
MDOCS_HTML_TARGET = $(MDOCS_DIR)/misc-docs.html
MDOCS_PDF_TARGET = $(MDOCS_DIR)/misc-docs.pdf
MDOCS_PS_TARGET = $(MDOCS_DIR)/misc-docs.ps
@@ -29,119 +17,42 @@
MDOCS_ALL_SOURCE = $(MDOCS_DIR)/*.xml
MDOCS_INSTALL_DIR = $(INSTALL_DIR)/misc-docs
-XSL_FO = ${BOOK_TOP}/tools/fo-stylesheet.xsl
-XSL_HTML = $(BOOK_TOP)/tools/html-stylesheet.xsl
-XSL_HTML_CHUNK = $(BOOK_TOP)/tools/chunk-stylesheet.xsl
+XSL_FO = ${DOC_TOP}/tools/fo-stylesheet.xsl
+XSL_HTML = $(DOC_TOP)/tools/html-stylesheet.xsl
+XSL_HTML_CHUNK = $(DOC_TOP)/tools/chunk-stylesheet.xsl
-RUN_FOP = ${BOOK_TOP}/tools/bin/run-fop.sh
+RUN_FOP = ${DOC_TOP}/tools/bin/run-fop.sh
# Book xsltproc options for HTML output
# Note: --stringparam arguments no longer go here;
# see tools/html-stylesheet.xsl and tools/chunk-stylesheet.xsl
-BOOK_HTML_XSLTPROC_OPTS =
+DOC_HTML_XSLTPROC_OPTS =
# Book xsltproc options for PDF and PostScript output
-# BOOK_PDF_XSLTPROC_OPTS = --stringparam page.height 9in --stringparam page.width 6.4in
-# BOOK_PS_XSLTPROC_OPTS = --stringparam page.height 9in --stringparam page.width 6.4in
+# DOC_PDF_XSLTPROC_OPTS = --stringparam page.height 9in --stringparam page.width 6.4in
+# DOC_PS_XSLTPROC_OPTS = --stringparam page.height 9in --stringparam page.width 6.4in
# Uncomment the following line if you'd like to print on A4 paper
-# BOOK_PDF_XSLTPROC_OPTS = --stringparam paper.type A4
+# DOC_PDF_XSLTPROC_OPTS = --stringparam paper.type A4
all: all-html all-pdf all-ps
-install: install-book install-misc-docs
+install: install-misc-docs
-all-html: book-html book-html-chunk misc-docs-html
+all-html: misc-docs-html
-all-pdf: book-pdf misc-docs-pdf
+all-pdf: misc-docs-pdf
-all-ps: book-ps misc-docs-ps
+all-ps: misc-docs-ps
-all-book: book-html book-html-chunk book-pdf book-ps
+all-misc-docs: misc-docs-html misc-docs-pdf
-install-book: install-book-html install-book-html-chunk install-book-pdf install-book-ps
-
-all-misc-docs: misc-docs-html misc-docs-pdf book-ps
-
install-misc-docs: install-misc-html install-misc-pdf \
install-misc-ps
-clean: book-clean misc-docs-clean
+clean: misc-docs-clean
-$(BOOK_VERSION_SOURCE): book-version
-book-version:
- @if $(SVNVERSION) . > /dev/null; then \
- echo '<!ENTITY svn.version "Revision '`$(SVNVERSION) .`'">' > $(BOOK_VERSION_SOURCE).tmp; \
- else \
- echo '<!ENTITY svn.version "">' > $(BOOK_VERSION_SOURCE).tmp; \
- fi
- @if cmp -s $(BOOK_VERSION_SOURCE) $(BOOK_VERSION_SOURCE).tmp; then \
- rm $(BOOK_VERSION_SOURCE).tmp; \
- else \
- mv $(BOOK_VERSION_SOURCE).tmp $(BOOK_VERSION_SOURCE); \
- fi
-
-book-html: $(BOOK_HTML_TARGET)
-
-$(BOOK_HTML_TARGET): $(BOOK_ALL_SOURCE) $(BOOK_VERSION_SOURCE)
- $(XSLTPROC) $(BOOK_HTML_XSLTPROC_OPTS) \
- --output $(BOOK_HTML_TARGET) $(XSL_HTML) $(BOOK_XML_SOURCE)
-
-book-html-chunk: $(BOOK_HTML_CHUNK_TARGET)
-
-## This trailing slash is essential that xsltproc will output pages to the dir
-$(BOOK_HTML_CHUNK_TARGET): $(BOOK_ALL_SOURCE) $(BOOK_VERSION_SOURCE) \
- $(BOOK_DIR)/styles.css $(BOOK_IMAGES)
- mkdir -p $(BOOK_HTML_CHUNK_DIR)
- mkdir -p $(BOOK_HTML_CHUNK_DIR)/images
- $(XSLTPROC) $(BOOK_HTML_XSLTPROC_OPTS) \
- --output $(BOOK_HTML_CHUNK_DIR)/ \
- $(XSL_HTML_CHUNK) $(BOOK_XML_SOURCE)
- cp $(BOOK_DIR)/styles.css $(BOOK_HTML_CHUNK_DIR)
- cp $(BOOK_IMAGES) $(BOOK_HTML_CHUNK_DIR)/images
-
-book-pdf: $(BOOK_PDF_TARGET)
-
-book-ps: $(BOOK_PS_TARGET)
-
-$(BOOK_PDF_TARGET): $(BOOK_ALL_SOURCE) $(BOOK_VERSION_SOURCE) $(BOOK_IMAGES)
- $(XSLTPROC) $(BOOK_PDF_XSLTPROC_OPTS) \
- --output $(BOOK_FO_TARGET) $(XSL_FO) $(BOOK_XML_SOURCE)
- $(RUN_FOP) $(BOOK_TOP) -fo $(BOOK_FO_TARGET) -pdf $(BOOK_PDF_TARGET)
-
-$(BOOK_PS_TARGET): $(BOOK_ALL_SOURCE) $(BOOK_VERSION_SOURCE) $(BOOK_IMAGES)
- $(XSLTPROC) $(BOOK_PS_XSLTPROC_OPTS) \
- --output $(BOOK_FO_TARGET) $(XSL_FO) $(BOOK_XML_SOURCE)
- $(RUN_FOP) $(BOOK_TOP) -fo $(BOOK_FO_TARGET) -ps $(BOOK_PS_TARGET)
-
-$(BOOK_INSTALL_DIR):
- $(INSTALL) -d $(BOOK_INSTALL_DIR)
-
-install-book-html: $(BOOK_HTML_TARGET)
- $(INSTALL) -d $(BOOK_INSTALL_DIR)/images
- $(INSTALL) $(BOOK_HTML_TARGET) $(BOOK_INSTALL_DIR)
- $(INSTALL) $(BOOK_DIR)/styles.css $(BOOK_INSTALL_DIR)
- $(INSTALL) $(BOOK_IMAGES) $(BOOK_INSTALL_DIR)/images
-
-install-book-html-chunk: $(BOOK_HTML_CHUNK_TARGET)
- $(INSTALL) -d $(BOOK_INSTALL_DIR)/images
- $(INSTALL) $(BOOK_HTML_CHUNK_DIR)/*.html $(BOOK_INSTALL_DIR)
- $(INSTALL) $(BOOK_DIR)/styles.css $(BOOK_INSTALL_DIR)
- $(INSTALL) $(BOOK_IMAGES) $(BOOK_INSTALL_DIR)/images
-
-install-book-pdf: $(BOOK_PDF_TARGET) $(BOOK_INSTALL_DIR)
- $(INSTALL) $(BOOK_PDF_TARGET) $(BOOK_INSTALL_DIR)
-
-install-book-ps: $(BOOK_PS_TARGET) $(BOOK_INSTALL_DIR)
- $(INSTALL) $(BOOK_PS_TARGET) $(BOOK_INSTALL_DIR)
-
-book-clean:
- rm -f $(BOOK_VERSION_SOURCE)
- rm -f $(BOOK_HTML_TARGET) $(BOOK_FO_TARGET)
- rm -rf $(BOOK_HTML_CHUNK_DIR)
- rm -f $(BOOK_PDF_TARGET) $(BOOK_PS_TARGET)
-
misc-docs-html: $(MDOCS_HTML_TARGET)
$(MDOCS_HTML_TARGET): $(MDOCS_ALL_SOURCE)
@@ -153,11 +64,11 @@
$(MDOCS_PDF_TARGET): $(MDOCS_ALL_SOURCE)
$(XSLTPROC) $(XSL_FO) $(MDOCS_XML_SOURCE) > $(MDOCS_FO_TARGET)
- $(RUN_FOP) $(BOOK_TOP) -fo $(MDOCS_FO_TARGET) -pdf $(MDOCS_PDF_TARGET)
+ $(RUN_FOP) $(DOC_TOP) -fo $(MDOCS_FO_TARGET) -pdf $(MDOCS_PDF_TARGET)
$(MDOCS_PS_TARGET): $(MDOCS_ALL_SOURCE)
$(XSLTPROC) $(XSL_FO) $(MDOCS_XML_SOURCE) > $(MDOCS_FO_TARGET)
- $(RUN_FOP) $(BOOK_TOP) -fo $(MDOCS_FO_TARGET) -ps $(MDOCS_PS_TARGET)
+ $(RUN_FOP) $(DOC_TOP) -fo $(MDOCS_FO_TARGET) -ps $(MDOCS_PS_TARGET)
misc-docs-clean:
rm -f $(MDOCS_HTML_TARGET) $(MDOCS_FO_TARGET)
-- sunny256
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 9 04:41:02 2005