Official Osmocom User Manuals (shared / common parts and build scripts)
Go to file
Neels Hofmeyr c8c77af77f fix srcdir to reflect $abs_srcdir
When building .adoc files, we pass a srcdir variable to allow including files
that are only in the source tree, but not in the build tree.

However, so far {srcdir} is a relative path, and when an .adoc file includes an
.adoc file in a subdir, then the directive
  include::{srcdir}
is evaluated relative to the .adoc file in the subdir, not in the original make
CWD. Hence the path ends up pointing at the wrong place.

Fix this by passing an absolute path as srcdir instead.

I discovered this here:

osmo-hlr/doc/manuals/osmohlr-usermanual.adoc:
  include::{srcdir}/chapters/proxy_cache.adoc[]

osmo-hlr/doc/manuals/chapters/proxy_cache.adoc:
  ["mscgen"]
  ----
  include::{srcdir}/chapters/proxy_cache_attach.msc[]
  ----

(Note that I could have just removed "{srcdir}/chapters/" since .adoc and .msc
are in the same dir, but the point of this patch is to make {srcdir} generally
useful in all levels of included .adoc files.)

The above resulted in:

  asciidoc: include: /n/s/dev/src/osmo-hlr/doc/manuals/chapters/proxy_cache.adoc
  asciidoc: osmohlr-usermanual.adoc: line 29: reading: /n/s/dev/src/osmo-hlr/doc/manuals/chapters/proxy_cache.adoc
  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

Note that /n/s/dev/src/src/osmo-hlr should only have one 'src' element.
With $abs_srcdir this becomes:

  asciidoc: include: /n/s/dev/make/osmo-hlr/../../src/osmo-hlr/doc/manuals/chapters/proxy_cache.adoc
  asciidoc: osmohlr-usermanual.adoc: line 29: reading: /n/s/dev/make/osmo-hlr/../../src/osmo-hlr/doc/manuals/chapters/proxy_cache.adoc
  asciidoc: include: /n/s/dev/make/osmo-hlr/../../src/osmo-hlr/doc/manuals/chapters/proxy_cache_attach.msc
  asciidoc: proxy_cache.adoc: line 263: reading: /n/s/dev/make/osmo-hlr/../../src/osmo-hlr/doc/manuals/chapters/proxy_cache_attach.msc

I have not investigated whether/why all the other 'include::' all over the
place seem to be working -- maybe we never include .adoc in subdirectories that
in turn use {srcdir}? Or we have lots of missing images we didn't notice yet?

Todo: the missing include should have fatally broken the build, but it just
builds the PDF with missing images. a) the mscgen plugin finding empty content
and b) the missing .png files should have caused the build to abort?

Change-Id: If847f16eab3ddba6009f67ed641b48805467eb1b
2020-01-24 05:13:15 +01:00
build fix srcdir to reflect $abs_srcdir 2020-01-24 05:13:15 +01:00
common bts.adoc: Add information about RACH tuning parameters 2020-01-09 10:55:49 +01:00
contrib Makefile.asciidoc.inc: warnings check not default 2019-08-05 17:50:35 +00:00
debian Bump version: 0.2.0.18-258b → 0.3.0 2020-01-03 13:00:12 +01:00
tests tests: add second VTY reference 2019-12-03 11:45:03 +01:00
.gitignore gitignore: add "make distcheck" generated files 2018-11-21 14:37:49 +01:00
.gitreview add .gitreview 2016-10-18 12:44:12 +00:00
INSTALL.txt Drop python2 and pychart dependencies 2019-12-05 16:40:13 +01:00
Makefile.am Makefile.am: include osmo-release.mk 2019-05-29 10:07:08 +02:00
check-depends.sh debian/check-depends.sh: add inkscape to depends 2019-12-09 08:38:35 +01:00
configure.ac Makefile.asciidoc.inc: warnings check not default 2019-08-05 17:50:35 +00:00
git-version-gen prepare for autotools: add git-version-gen 2018-11-20 17:13:25 +01:00
merge_doc.xsl merge_doc.xsl: move from libosmocore.git 2018-11-12 12:18:41 +01:00
osmo-gsm-manuals.pc.in use autotools to add "make install" target 2018-11-21 14:29:05 +01:00
vty_reference.xsl initial checkin of manuals to public repo 2016-02-20 15:01:50 +01:00