aboutsummaryrefslogtreecommitdiffstats
path: root/docbook/Makefile.am
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2014-06-15 19:39:09 +0200
committerAnders Broman <a.broman58@gmail.com>2014-06-16 14:19:13 +0000
commit066a9f3d2dae0d421ddd66f42d6132bcb1683940 (patch)
treefc1ea6b209f7b67895ddc22f30725d4b75c5c65a /docbook/Makefile.am
parent0a29589c01b5aa9ec32c6624e90b32f546090c12 (diff)
Support out-of-source docbook build
Change-Id: I273a6317c459664a247d3f5623ef54b0a70a9ab8 Reviewed-on: https://code.wireshark.org/review/2232 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'docbook/Makefile.am')
-rw-r--r--docbook/Makefile.am50
1 files changed, 30 insertions, 20 deletions
diff --git a/docbook/Makefile.am b/docbook/Makefile.am
index 9d8c45fb74..2bf9062c03 100644
--- a/docbook/Makefile.am
+++ b/docbook/Makefile.am
@@ -59,7 +59,7 @@ endif
# .asciidoc -> whole book (.dbk) -> chapter (.xml)
wsug_src/%.asciidoc : wsug_src/%.xml
$(A2X) --verbose \
- --asciidoc-opts="--conf-file=asciidoc.conf" \
+ --asciidoc-opts="--conf-file=$(srcdir)/asciidoc.conf" \
--no-xmllint \
--format=docbook --doctype=book \
$<
@@ -99,7 +99,7 @@ wsug: $(WSUG_TARGETS)
wsug.validated: $(WSUG_SOURCE) wsluarm
if HAVE_XMLLINT
@ echo --- WSUG - VALIDATING XML ---
- $(XMLLINT) --valid --noout $<
+ $(XMLLINT) --path .:wsluarm_src:$(srcdir) --valid --noout $<
touch $@
else
@ echo --- WSUG - SKIP VALIDATION ---
@@ -118,6 +118,7 @@ wsug_html/index.html: $(WSUG_SOURCE) wsluarm
--stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ \
--stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
--stringparam html.stylesheet ws.css \
+ --path .:wsluarm_src \
--nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
-chmod -R og+rX wsug_html
@@ -134,6 +135,7 @@ wsug_html_chunked/index.html: $(WSUG_SOURCE) wsluarm
--stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ \
--stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 \
--stringparam html.stylesheet ws.css \
+ --path .:wsluarm_src \
--nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl $<
-chmod -R og+rX wsug_html_chunked
@@ -141,13 +143,17 @@ wsug_html_chunked/index.html: $(WSUG_SOURCE) wsluarm
# you will get lot's of errors, but that's ok
user-guide-us.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
@ echo --- WSUG - PDF US PAPER ---
- $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
+ $(XSLTPROC) --stringparam paper.type letter \
+ --path .:wsluarm_src:$(srcdir) \
+ --nonet custom_layer_pdf.xsl $< > $@
# create pdf file (through XSL-FO), portrait pages on A4 paper
# you will get lot's of errors, but that's ok
user-guide-a4.fo: $(WSUG_SOURCE) custom_layer_pdf.xsl wsluarm
@ echo --- WSUG - PDF A4 PAPER ---
- $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
+ $(XSLTPROC) --stringparam paper.type A4 \
+ --path .:wsluarm_src:$(srcdir) \
+ --nonet custom_layer_pdf.xsl $< > $@
wsluarm: make-wsluarm.pl $(WSLUA_MODULES)
mkdir -p wsluarm_src
@@ -171,7 +177,7 @@ wsdg: $(WSDG_TARGETS)
developer-guide.xml: developer-guide.asciidoc $(WSDG_FILES)
$(A2X) --verbose \
--attribute=docinfo \
- --asciidoc-opts="--conf-file=asciidoc.conf" \
+ --asciidoc-opts="--conf-file=$(srcdir)/asciidoc.conf" \
--no-xmllint \
--format=docbook \
$<
@@ -180,7 +186,7 @@ developer-guide.xml: developer-guide.asciidoc $(WSDG_FILES)
wsdg.validated: $(WSDG_SOURCE)
if HAVE_XMLLINT
@ echo --- WSDG - VALIDATING XML ---
- $(XMLLINT) --valid --noout $<
+ $(XMLLINT) --path .:$(srcdir) --valid --noout $<
touch $@
else
@ echo --- WSDG - SKIP VALIDATION ---
@@ -193,7 +199,7 @@ wsdg_html/index.html: $(WSDG_SOURCE)
@ echo --- WSDG - HTML SINGLE PAGE ---
mkdir -p wsdg_html/wsdg_graphics/toolbar
cp $(srcdir)/wsdg_graphics/*.* wsdg_html/wsdg_graphics
- cp wsdg_graphics/toolbar/* wsdg_html/wsdg_graphics/toolbar/
+ cp $(srcdir)/wsdg_graphics/toolbar/* wsdg_html/wsdg_graphics/toolbar/
cp $(srcdir)/ws.css wsdg_html
$(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam use.id.as.filename 1 \
--stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ \
@@ -209,7 +215,7 @@ wsdg_html_chunked/index.html: $(WSDG_SOURCE)
@ echo --- WSDG - HTML CHUNKED ---
mkdir -p wsdg_html_chunked/wsdg_graphics/toolbar
cp $(srcdir)/wsdg_graphics/*.* wsdg_html_chunked/wsdg_graphics
- cp wsdg_graphics/toolbar/* wsdg_html_chunked/wsdg_graphics/toolbar/
+ cp $(srcdir)/wsdg_graphics/toolbar/* wsdg_html_chunked/wsdg_graphics/toolbar/
cp $(srcdir)/ws.css wsdg_html_chunked
$(XSLTPROC) --stringparam base.dir wsdg_html_chunked/ --stringparam use.id.as.filename 1 \
--stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ \
@@ -222,13 +228,17 @@ wsdg_html_chunked/index.html: $(WSDG_SOURCE)
# you will get lot's of errors, but that's ok
developer-guide-us.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
@ echo --- WSDG - PDF US PAPER ---
- $(XSLTPROC) --stringparam paper.type letter --nonet custom_layer_pdf.xsl $< > $@
+ $(XSLTPROC) --stringparam paper.type letter \
+ --path .:$(srcdir) \
+ --nonet custom_layer_pdf.xsl $< > $@
# create pdf file (through XSL-FO), portrait pages on A4 paper
# you will get lot's of errors, but that's ok
developer-guide-a4.fo: $(WSDG_SOURCE) custom_layer_pdf.xsl
@ echo --- WSDG - PDF A4 PAPER ---
- $(XSLTPROC) --stringparam paper.type A4 --nonet custom_layer_pdf.xsl $< > $@
+ $(XSLTPROC) --stringparam paper.type A4 \
+ --path .:$(srcdir) \
+ --nonet custom_layer_pdf.xsl $< > $@
if HAVE_FOP
@@ -242,18 +252,18 @@ release_notes: $(RELEASE_NOTES_TARGETS)
# create html single page file
release-notes.html: $(RELEASE_NOTES_SOURCE)
@ echo --- RELEASE NOTES - HTML ---
- $(A2X) --format=xhtml $(A2X_HTML_OPTS) release-notes.asciidoc
+ $(A2X) --format=xhtml $(A2X_HTML_OPTS) $(srcdir)/release-notes.asciidoc
# create txt single page file (through HTML)
release-notes.txt: $(RELEASE_NOTES_SOURCE)
@ echo --- RELEASE NOTES - TXT ---
$(A2X) --format=text $(A2X_TEXT_OPTS) \
--xsltproc-opts "--stringparam generate.toc \"article nop\"" \
- release-notes.asciidoc
- mv release-notes.text $@
+ $(srcdir)/release-notes.asciidoc
+ mv $(srcdir)/release-notes.text $@
news: release-notes.txt
- cp release-notes.txt ../NEWS
+ cp $(srcdir)/release-notes.txt ../NEWS
# Apparently we can only run one instance of a2x at a time.
.NOTPARALLEL: release-notes-us.pdf release-notes-a4.pdf
@@ -262,18 +272,18 @@ release-notes-us.pdf: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
@ echo --- RELEASE NOTES - PDF US LETTER PAPER ---
$(A2X) --format=pdf $(A2X_HTML_OPTS) --fop \
--xsltproc-opts "--stringparam paper.type letter --nonet" \
- --xsl-file=custom_layer_pdf.xsl \
- release-notes.asciidoc
- mv release-notes.pdf $@
+ --xsl-file=$(srcdir)/custom_layer_pdf.xsl \
+ $(srcdir)/release-notes.asciidoc
+ mv $(srcdir)/release-notes.pdf $@
# create pdf file, portrait pages on A4 paper
release-notes-a4.pdf: $(RELEASE_NOTES_SOURCE) custom_layer_pdf.xsl
@ echo --- RELEASE NOTES - PDF A4 PAPER ---
$(A2X) --format=pdf $(A2X_HTML_OPTS) --fop \
--xsltproc-opts "--stringparam paper.type A4 --nonet" \
- --xsl-file=custom_layer_pdf.xsl \
- release-notes.asciidoc
- mv release-notes.pdf $@
+ --xsl-file=$(srcdir)/custom_layer_pdf.xsl \
+ $(srcdir)/release-notes.asciidoc
+ mv $(srcdir)/release-notes.pdf $@
clean-local:
-rm -rf $(CLEANDIRS)