summaryrefslogtreecommitdiffstats
path: root/build/Makefile.docbook.inc
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2018-11-14 15:51:07 +0100
committerOliver Smith <osmith@sysmocom.de>2018-11-21 14:35:03 +0100
commit2682f146118757a724765ebe9ea31f3c88b4b3fa (patch)
tree9f7529c8f841b07e0405c2f202d4dcbe762ca5dc /build/Makefile.docbook.inc
parente388d006f3fd38ee41a712144ebab15929f09dcf (diff)
Makefile.*.inc: adjust to out-of-tree building
Makefile.asciidoc.inc: create a symlink for the root adoc file, from which a PDF gets generated, from the srcdir to the builddir. This file may include other adoc files, which do not get symlinked. We need to do this, because a2x (the program generating the PDF file) does not have a parameter for the output file, and will otherwise generate the PDF in the srcdir instead of the builddir. Do the same in the check target, so the relative include paths work the same. Makefile.asciidoc.inc, Makefile.docbook.inc: set the include paths for the xstl parser, as well as the LaTeX compiler, so they can find the files they need from both OSMO_GSM_MANUALS_DIR and builddir. Makefile.asciidoc.inc, Makefile.docbook.inc: refer to the output file $@ with $(notdir $@). This removes the path from the file, like basename from coreutils. The output file will then be placed in the builddir instead of the srcdir. Makefile.vty-reference.inc: use $(srcdir) in references to vty/*.xml files. (moving manuals to project repositories 12/19) Related: OS#3385 Change-Id: Ie6b212a6518f0fc29fae610a37ae6c533189278d
Diffstat (limited to 'build/Makefile.docbook.inc')
-rw-r--r--build/Makefile.docbook.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/build/Makefile.docbook.inc b/build/Makefile.docbook.inc
index 7b9969a..373db7d 100644
--- a/build/Makefile.docbook.inc
+++ b/build/Makefile.docbook.inc
@@ -32,6 +32,8 @@ all: $(DOCBOOKS_PDF)
xmllint --xinclude --postvalid --noout $<
# Create a PDF file and lint it before
+# xslt path: find includes in both $(OSMO_GSM_MANUALS_DIR)/common/chapters and $(builddir)/generated
%.pdf: %.xml %.xml-lint $(DOCBOOKS_DEPS) build common
- dblatex $(dblatex_quiet) -P draft.mode=no $<
+ dblatex --xslt-opts="--path $(realpath $(OSMO_GSM_MANUALS_DIR))/common/chapters:$$PWD/generated" \
+ $(dblatex_quiet) -P draft.mode=no -o $(notdir $@) $<