<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16990">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fix srcdir to reflect $abs_srcdir<br><br>When building .adoc files, we pass a srcdir variable to allow including files<br>that are only in the source tree, but not in the build tree.<br><br>However, so far {srcdir} is a relative path, and when an .adoc file includes an<br>.adoc file in a subdir, then the directive<br>  include::{srcdir}<br>is evaluated relative to the .adoc file in the subdir, not in the original make<br>CWD. Hence the path ends up pointing at the wrong place.<br><br>Fix this by passing an absolute path as srcdir instead.<br><br>I discovered this here:<br><br>osmo-hlr/doc/manuals/osmohlr-usermanual.adoc:<br>  include::{srcdir}/chapters/proxy_cache.adoc[]<br><br>osmo-hlr/doc/manuals/chapters/proxy_cache.adoc:<br>  ["mscgen"]<br>  ----<br>  include::{srcdir}/chapters/proxy_cache_attach.msc[]<br>  ----<br><br>(Note that I could have just removed "{srcdir}/chapters/" since .adoc and .msc<br>are in the same dir, but the point of this patch is to make {srcdir} generally<br>useful in all levels of included .adoc files.)<br><br>The above resulted in:<br><br>  asciidoc: include: /n/s/dev/src/osmo-hlr/doc/manuals/chapters/proxy_cache.adoc<br>  asciidoc: osmohlr-usermanual.adoc: line 29: reading: /n/s/dev/src/osmo-hlr/doc/manuals/chapters/proxy_cache.adoc<br>  asciidoc: WARNING: proxy_cache.adoc: line 263: include file not found: /n/s/dev/src/src/osmo-hlr/doc/manuals/chapters/proxy_cache_attach.msc<br><br>Note that /n/s/dev/src/src/osmo-hlr should only have one 'src' element.<br>With $abs_srcdir this becomes:<br><br>  asciidoc: include: /n/s/dev/make/osmo-hlr/../../src/osmo-hlr/doc/manuals/chapters/proxy_cache.adoc<br>  asciidoc: osmohlr-usermanual.adoc: line 29: reading: /n/s/dev/make/osmo-hlr/../../src/osmo-hlr/doc/manuals/chapters/proxy_cache.adoc<br>  asciidoc: include: /n/s/dev/make/osmo-hlr/../../src/osmo-hlr/doc/manuals/chapters/proxy_cache_attach.msc<br>  asciidoc: proxy_cache.adoc: line 263: reading: /n/s/dev/make/osmo-hlr/../../src/osmo-hlr/doc/manuals/chapters/proxy_cache_attach.msc<br><br>I have not investigated whether/why all the other 'include::' all over the<br>place seem to be working -- maybe we never include .adoc in subdirectories that<br>in turn use {srcdir}? Or we have lots of missing images we didn't notice yet?<br><br>Todo: the missing include should have fatally broken the build, but it just<br>builds the PDF with missing images. a) the mscgen plugin finding empty content<br>and b) the missing .png files should have caused the build to abort?<br><br>Change-Id: If847f16eab3ddba6009f67ed641b48805467eb1b<br>---<br>M build/Makefile.asciidoc.inc<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/90/16990/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc</span><br><span>index 54969fc..63c2bea 100644</span><br><span>--- a/build/Makefile.asciidoc.inc</span><br><span>+++ b/build/Makefile.asciidoc.inc</span><br><span>@@ -37,7 +37,7 @@</span><br><span> CLEAN_FILES += $(ASCIIDOC_PDF) $(ASCIIDOC_NAME:%=%.html)</span><br><span> UPLOAD_FILES += $(ASCIIDOC_PDF)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -a srcdir='$(srcdir)' -a commondir='$(COMMONDIR)'</span><br><span style="color: hsl(120, 100%, 40%);">+ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -a srcdir='$(abs_srcdir)' -a commondir='$(COMMONDIR)'</span><br><span> DBLATEX_OPTS := -s $(ASCIIDOCSTYLE) -P draft.mode=yes -P draft.watermark=0</span><br><span> </span><br><span> ifeq (,$(BUILD_RELEASE))</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16990">change 16990</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/c/osmo-gsm-manuals/+/16990"/><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-Change-Id: If847f16eab3ddba6009f67ed641b48805467eb1b </div>
<div style="display:none"> Gerrit-Change-Number: 16990 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>