This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has uploaded this change for review. ( https://gerrit.osmocom.org/11803 Change subject: Makefile.*.inc: adjust to out-of-tree building ...................................................................... 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 srcdir andbuilddir. Makefile.vty-reference.inc: use $(srcdir) in references to vty/*.xml files. (moving manuals to project repositories 11/16) Related: OS#3385 Change-Id: Ie6b212a6518f0fc29fae610a37ae6c533189278d --- M build/Makefile.asciidoc.inc M build/Makefile.docbook.inc M build/Makefile.vty-reference.inc 3 files changed, 20 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/03/11803/1 diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 4cad1f3..0d5c497 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -54,12 +54,18 @@ $(OSMO_GSM_MANUALS_DIR)/common/*/*.adoc \ $(OSMO_GSM_MANUALS_DIR)/common/images/* \ build common + + # a2x can't use a different output file, so we symlink the file to the + # build folder in case of an out-of-tree build + [ -f $(notdir $<) ] || ln -s $< $(notdir $<) + @test -n "$(BUILD_RELEASE)" && echo -e "\n\n\ NOTE: TO REMOVE DRAFT MODE, YOU NEED TO EDIT build/custom-dblatex.sty\n\ and remove three lines starting with '% \"DRAFT\" on first page'\n" \ || true - a2x $(A2X_OPTS) $< || (echo "ERROR: a2x failed! Running asciidoc to get verbose errors..."; \ - asciidoc -v $(ASCIIDOC_OPTS) $<; exit 1) + TEXINPUTS="$(OSMO_GSM_MANUALS_DIR)" \ + a2x $(A2X_OPTS) $(notdir $<) || (echo "ERROR: a2x failed! Running asciidoc to get verbose errors..."; \ + asciidoc -v $(ASCIIDOC_OPTS) $(notdir $<); exit 1) check: $(ASCIIDOC_CHECKS) @@ -68,7 +74,14 @@ $(OSMO_GSM_MANUALS_DIR)/common/chapters/*.adoc \ $(ASCIIDOC_DEPS) \ build common - asciidoc -v $(ASCIIDOC_OPTS) $< > $@ 2>&1 + + # out-of-tree building: use a symlink to the output file like done in + # the non-check build above, so the relative include paths work the + # same. + [ -f $(notdir $<) ] || ln -s $< $(notdir $<) + + asciidoc -v $(ASCIIDOC_OPTS) $(notdir $<) > $@ 2>&1 + # Make absolutely sure that the %.check target is updated. touch $@ # Do print the WARNING output but return error if any was found diff --git a/build/Makefile.docbook.inc b/build/Makefile.docbook.inc index e746d58..96d9073 100644 --- a/build/Makefile.docbook.inc +++ b/build/Makefile.docbook.inc @@ -31,5 +31,6 @@ # Create a PDF file and lint it before %.pdf: %.xml %.xml-lint $(DOCBOOKS_DEPS) build common - dblatex $(dblatex_quiet) -P draft.mode=no $< + dblatex --xslt-opts="--path $(OSMO_GSM_MANUALS_DIR)/common/chapters:$$PWD/generated" \ + $(dblatex_quiet) -P draft.mode=no -o $@ $< diff --git a/build/Makefile.vty-reference.inc b/build/Makefile.vty-reference.inc index 32c98b8..855d8aa 100644 --- a/build/Makefile.vty-reference.inc +++ b/build/Makefile.vty-reference.inc @@ -30,13 +30,13 @@ CLEAN_FILES += generated generated/docbook_vty.xml: \ - vty/*xml \ + $(srcdir)/vty/*xml \ $(OSMO_GSM_MANUALS_DIR)/common/vty_additions.xml \ $(OSMO_GSM_MANUALS_DIR)/common/chapters/vty.xml \ $(OSMO_GSM_MANUALS_DIR)/vty_reference.xsl $(OSMO_GSM_MANUALS_DIR)/build/vty_reference_combine.sh "$(MERGE_DOC)" \ $(srcdir)/vty/*reference.xml \ $(OSMO_GSM_MANUALS_DIR)/common/vty_additions.xml \ - vty/*additions*.xml + $(srcdir)/vty/*additions*.xml xsltproc $(OSMO_GSM_MANUALS_DIR)/vty_reference.xsl generated/combined.xml \ > generated/docbook_vty.xml -- To view, visit https://gerrit.osmocom.org/11803 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6b212a6518f0fc29fae610a37ae6c533189278d Gerrit-Change-Number: 11803 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181116/9ac43e0f/attachment.htm>