<p>osmith <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11798">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Neels Hofmeyr: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">*filter.conf/*.sty: use symlinks to build, common<br><br>$(OSMO_GSM_MANUALS_DIR) is used in most places to reference to the top<br>dir, which contains "build" and "common". But not in the asciidoc<br>mscgen filter configurations, and in the custom LaTeX style. They have<br>../common or ../build hardcoded, which won't work anymore when the<br>project specific files will be in another repository.<br><br>Update the Makefiles to create symlinks to "build" and "common" in the<br>dir where the build was started. Use ./common in the files that had<br>../common hardcoded, and do the same for ./build.<br><br>Update the Makefile.common.inc comment to refer to common targets in<br>general, so we don't need to list each single one there (like the new<br>'common' and 'build' targets).<br><br>I've also thought about using variables there, but this would only work<br>for the asciidoc files, not for the .sty file. We would need to<br>generate the latter from another file and replace the variable<br>dynamically. Having the symlinks instead seemed to be slightly easier.<br><br>(moving manuals to project repositories 7/19)<br><br>Related: OS#3385<br>Change-Id: I4cfd1a9ef482d382f10cdf060e8e2cba81852864<br>---<br>M .gitignore<br>M build/Makefile.asciidoc.inc<br>M build/Makefile.common.inc<br>M build/Makefile.docbook.inc<br>M build/custom-dblatex.sty<br>M build/mscgen-filter.conf<br>M build/python2-filter.conf<br>7 files changed, 25 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/.gitignore b/.gitignore</span><br><span>index 30bc93e..b174bb9 100644</span><br><span>--- a/.gitignore</span><br><span>+++ b/.gitignore</span><br><span>@@ -34,3 +34,7 @@</span><br><span> *.pc</span><br><span> Makefile.in</span><br><span> Makefile</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# symlinks to shared dirs (needed for out-of-tree builds)</span><br><span style="color: hsl(120, 100%, 40%);">+*/common</span><br><span style="color: hsl(120, 100%, 40%);">+*/build</span><br><span>diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc</span><br><span>index 18cfa88..6b57c7d 100644</span><br><span>--- a/build/Makefile.asciidoc.inc</span><br><span>+++ b/build/Makefile.asciidoc.inc</span><br><span>@@ -54,7 +54,8 @@</span><br><span>                 $(ASCIIDOC_DEPS) \</span><br><span>           $(ASCIIDOCSTYLE) \</span><br><span>           $(OSMO_GSM_MANUALS_DIR)/common/*/*.adoc \</span><br><span style="color: hsl(0, 100%, 40%);">-               $(OSMO_GSM_MANUALS_DIR)/common/images/*</span><br><span style="color: hsl(120, 100%, 40%);">+               $(OSMO_GSM_MANUALS_DIR)/common/images/* \</span><br><span style="color: hsl(120, 100%, 40%);">+             build common</span><br><span>         @test -n "$(BUILD_RELEASE)" && echo -e "\n\n\</span><br><span>           NOTE: TO REMOVE DRAFT MODE, YOU NEED TO EDIT build/custom-dblatex.sty\n\</span><br><span>           and remove three lines starting with '% \"DRAFT\" on first page'\n" \</span><br><span>@@ -64,7 +65,11 @@</span><br><span> </span><br><span> check: $(ASCIIDOC_CHECKS)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(OSMO_GSM_MANUALS_DIR)/common/chapters/*.adoc $(ASCIIDOC_DEPS)</span><br><span style="color: hsl(120, 100%, 40%);">+$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml \</span><br><span style="color: hsl(120, 100%, 40%);">+         $(ASCIIDOCSTYLE) \</span><br><span style="color: hsl(120, 100%, 40%);">+            $(OSMO_GSM_MANUALS_DIR)/common/chapters/*.adoc \</span><br><span style="color: hsl(120, 100%, 40%);">+              $(ASCIIDOC_DEPS) \</span><br><span style="color: hsl(120, 100%, 40%);">+            build common</span><br><span>         asciidoc -v $(ASCIIDOC_OPTS) $< > $@ 2>&1</span><br><span>       # Make absolutely sure that the %.check target is updated.</span><br><span>   touch $@</span><br><span>diff --git a/build/Makefile.common.inc b/build/Makefile.common.inc</span><br><span>index 6a210bc..efd56f6 100644</span><br><span>--- a/build/Makefile.common.inc</span><br><span>+++ b/build/Makefile.common.inc</span><br><span>@@ -3,9 +3,14 @@</span><br><span> # Other makefiles like Makefile.asciidoc.inc and Makefile.vty-reference.inc add</span><br><span> # entries to UPLOAD_FILES and CLEAN_FILES.</span><br><span> #</span><br><span style="color: hsl(0, 100%, 40%);">-# Include this file at the end to have 'upload' and 'clean' targets.</span><br><span style="color: hsl(120, 100%, 40%);">+# Include this file at the end to have the common targets (upload, clean etc.).</span><br><span> </span><br><span> UPLOAD_PATH ?= generic@sysmocom-downloads:documents</span><br><span style="color: hsl(120, 100%, 40%);">+SYMLINKS = common build</span><br><span style="color: hsl(120, 100%, 40%);">+CLEAN_FILES += $(SYMLINKS)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+$(SYMLINKS):</span><br><span style="color: hsl(120, 100%, 40%);">+       ln -s $(OSMO_GSM_MANUALS_DIR)/$@ $@</span><br><span> </span><br><span> upload: $(UPLOAD_FILES)</span><br><span>   rsync -avz $(UPLOAD_FILES) $(UPLOAD_PATH)/</span><br><span>diff --git a/build/Makefile.docbook.inc b/build/Makefile.docbook.inc</span><br><span>index b69fcea..4d015a7 100644</span><br><span>--- a/build/Makefile.docbook.inc</span><br><span>+++ b/build/Makefile.docbook.inc</span><br><span>@@ -32,6 +32,6 @@</span><br><span>  xmllint --xinclude --postvalid --noout $<</span><br><span> </span><br><span> # Create a PDF file and lint it before</span><br><span style="color: hsl(0, 100%, 40%);">-%.pdf: %.xml %.xml-lint $(DOCBOOKS_DEPS)</span><br><span style="color: hsl(120, 100%, 40%);">+%.pdf: %.xml %.xml-lint $(DOCBOOKS_DEPS) build common</span><br><span>    dblatex $(dblatex_quiet) -P draft.mode=no $<</span><br><span> </span><br><span>diff --git a/build/custom-dblatex.sty b/build/custom-dblatex.sty</span><br><span>index 606b9ab..16931ad 100644</span><br><span>--- a/build/custom-dblatex.sty</span><br><span>+++ b/build/custom-dblatex.sty</span><br><span>@@ -1,5 +1,6 @@</span><br><span> %%</span><br><span> %% This style is derived from the docbook one.</span><br><span style="color: hsl(120, 100%, 40%);">+%% "${OSMO_GSM_MANUALS_DIR}/common" is symlinked to ./common when building.</span><br><span> %%</span><br><span> \NeedsTeXFormat{LaTeX2e}</span><br><span> \ProvidesPackage{asciidoc}[2008/06/05 AsciiDoc DocBook Style]</span><br><span>@@ -40,13 +41,13 @@</span><br><span> \textsf{</span><br><span> \vfill</span><br><span> \begin{center}</span><br><span style="color: hsl(0, 100%, 40%);">-  \includegraphics{../common/images/sysmocom.pdf}</span><br><span style="color: hsl(120, 100%, 40%);">+  \includegraphics{./common/images/sysmocom.pdf}</span><br><span>   \ \\ %</span><br><span>   \huge{\Company}</span><br><span> \end{center}</span><br><span> \vspace{2.5cm}</span><br><span> \begin{center}</span><br><span style="color: hsl(0, 100%, 40%);">-  \includegraphics{../common/images/osmocom.pdf}</span><br><span style="color: hsl(120, 100%, 40%);">+  \includegraphics{./common/images/osmocom.pdf}</span><br><span>   \ \\ %</span><br><span>   \vspace{0.5cm}</span><br><span>   \huge{\textbf{\DBKtitle}}\\ %</span><br><span>diff --git a/build/mscgen-filter.conf b/build/mscgen-filter.conf</span><br><span>index ce3cb3f..fa8f03e 100644</span><br><span>--- a/build/mscgen-filter.conf</span><br><span>+++ b/build/mscgen-filter.conf</span><br><span>@@ -1,9 +1,10 @@</span><br><span> #</span><br><span> # AsciiDoc mscgen filter configuration file.</span><br><span style="color: hsl(120, 100%, 40%);">+# ${OSMO_GSM_MANUALS}/build is symlinked to ./build when building.</span><br><span> #</span><br><span> </span><br><span> [mscgen-filter-style]</span><br><span style="color: hsl(0, 100%, 40%);">-mscgen-style=template="mscgen-block",subs=(),posattrs=("style","target"),filter='../build/filter-wrapper.py mscgen -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -T{format={basebackend-docbook!png}{basebackend-docbook?png}} -'</span><br><span style="color: hsl(120, 100%, 40%);">+mscgen-style=template="mscgen-block",subs=(),posattrs=("style","target"),filter='./build/filter-wrapper.py mscgen -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -T{format={basebackend-docbook!png}{basebackend-docbook?png}} -'</span><br><span> </span><br><span> [blockdef-listing]</span><br><span> template::[mscgen-filter-style]</span><br><span>diff --git a/build/python2-filter.conf b/build/python2-filter.conf</span><br><span>index ca2ddaf..812c7c2 100644</span><br><span>--- a/build/python2-filter.conf</span><br><span>+++ b/build/python2-filter.conf</span><br><span>@@ -1,9 +1,10 @@</span><br><span> #</span><br><span> # AsciiDoc mscgen filter configuration file.</span><br><span style="color: hsl(120, 100%, 40%);">+# ${OSMO_GSM_MANUALS}/build is symlinked to ./build when building.</span><br><span> #</span><br><span> </span><br><span> [python2-filter-style]</span><br><span style="color: hsl(0, 100%, 40%);">-python2-style=template="python2-block",subs=(),posattrs=("style","target"),filter='../build/filter-wrapper.py python2 - --output="{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}"'</span><br><span style="color: hsl(120, 100%, 40%);">+python2-style=template="python2-block",subs=(),posattrs=("style","target"),filter='./build/filter-wrapper.py python2 - --output="{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}"'</span><br><span> </span><br><span> [blockdef-listing]</span><br><span> template::[python2-filter-style]</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11798">change 11798</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11798"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-manuals </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I4cfd1a9ef482d382f10cdf060e8e2cba81852864 </div>
<div style="display:none"> Gerrit-Change-Number: 11798 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>