Commit Graph

67 Commits

Author SHA1 Message Date
Oliver Smith 8819bd91ec Cosmetic: build/Makefile.asciidoc: remove comments
Remove some commented out code for renaming pdfs that we don't use, and
that is probably broken.

Change-Id: Ibfe9580976919175f1d1bf8f7b35e4bc295049ee
2024-04-03 17:31:52 +02:00
Oliver Smith 9ff6ddaa6d build/Makefile.asciidoc: fix GIT_DATE
Omit the "../." parameter from git log. This is legacy from when all
manuals were in the osmo-gsm-manuals.git repository, and now causes the
wrong date to be used. After removal, it uses the date of the currently
checked out git commit again.

For most projects using osmo-gsm-manuals, the directory structure looks
like the following:

  ├── doc
  │   ├── manuals
  │   │   ├── build -> /usr/share/osmo-gsm-manuals/build
  │   │   ├── Makefile.am

Makefile.am includes build/Makefile.asciidoc.inc. With the "../."
parameter, git log parses the date of the last commit of the doc
directory. In case of osmo-hnbgw, this is:

  osmo-hnbgw/doc/manuals $ git log -n1 ../.
  commit 90928fb2467aef2b2b8419c1c96f7edae6fc2907
  Author: Neels Janosch Hofmeyr <nhofmeyr@sysmocom.de>
  Date:   Thu Nov 30 18:13:06 2023 +0100

      systemd,manual: set LimitNOFILE=65536

...which then leads to 2023-Nov-30 appearing in the document even though
the last commit in the repository is much newer.

Fixes: OS#6428
Change-Id: Id46d0d6928c0ad820214280cb36c0c3180f3bff1
2024-04-03 17:31:42 +02:00
Oliver Smith a3dc45e8d4 build: replace inkscape with rsvg-convert
Do not require having the graphical application inkscape and all its
dependencies installed, just to convert svgs to pdfs. This is still the
default in dblatex, even though converting on the command-line with
inkscape is deprecated. Use the lightweight rsvg-convert instead.

Merge at the same time as the docker-playground patch.

Depends: docker-playground I012c61eb777e6dc267dd4a52500da98c01ac1438
Change-Id: I0d132f8f6fd73fbe14b5bfa10a8659acaddf38f7
2023-08-17 13:03:49 +02:00
Oliver Smith cc71aeb2e7 build/Makefile.asciidoc: print less clutter
* Move the comments above the build targets, so they don't get printed
  during the build
* Remove the "TO REMOVE DRAFT MODE…" note. Printing this is no longer
  useful, the manuals for releases are now generated automatically with
  the Osmocom-release-manuals jenkins job, which removes the draft mode.
  There is no need to do this step manually.

Depends: osmo-ci Ia27cb8e4dd0204c0a91c322bed65bf8c9847a7be
Change-Id: I23d11bab274793eb8bcedc3fd9290901823e32d2
2023-08-04 13:09:06 +02:00
Oliver Smith afc081e131 build/Makefile.docbook: fix INC_DIR for openbsc
When Makefile.docbook.inc gets included by openbsc, the PWD Makefile
variable is empty (probably because the including file is not generated
by automake). Use the shell pwd command instead.

This fixes the master-openbsc jenkins job which has been failing since
previous patch dba860c7 ("VTY references: set git version and date")
was merged.

Related: OS#4063
Change-Id: I6026623ec9a5eef0ca8c47bf46605086e361c2bc
2023-05-16 11:49:39 +02:00
Oliver Smith dba860c733 VTY references: set git version and date
Fix that VTY references currently don't have the version from which they
were generated. Set the same REVNUMBER and GIT_DATE variables in
Makefile.docbook.inc (gets included in Makefile.vty-rference.inc)
as in Makefile.asciidoc.inc. Use them with a new script to rewrite the
<revhistory> block of vty references.

Closes: OS#4063
Change-Id: I68a8c3893d3c3a3b1bc1aee442a17635b60ac531
2023-05-11 17:05:58 +02:00
Oliver Smith 42cb9816db build/Makefile.common: full path for shrink script
Use the full path to shrink-pdfs.sh, so it works as expected when the
symlinks are not present. This is how pysim uses the publish/shrink
targets.

Fix for:
  build/shrink-pdfs.sh _build/latex/osmopysim-usermanual.pdf
  make: build/shrink-pdfs.sh: Command not found

Related: SYS#6380
Change-Id: Iba6e0e4932741adcb9e54e54eb7774716fb2e244
2023-03-20 11:15:46 +01:00
Oliver Smith 24cca7086b build/Makefile.common: shrink pdfs before publish
Closes: SYS#6380
Change-Id: I7c01b1cb1a0e7de385359671461a0ad142dfa5ad
2023-03-17 12:42:01 +01:00
Oliver Smith 33b5f5c889 build/Makefile.common: move clean/distclean down
Group upload and publish closer together by moving the clean targets to
the bottom.

Related: SYS#6380
Change-Id: Id8b6ead89a2aeba28e9c55bcfde6564376e8418a
2023-03-17 12:41:58 +01:00
Oliver Smith 2cef0dc72f Cosmetic: build/Makefile.common.inc: add comments
Describe what upload and publish do, it's not clear from the name of
these make targets.

Related: SYS#6380
Change-Id: Ic2ab9df2192912d20ede0241abe01e8d26a9afcc
2023-03-17 12:41:54 +01:00
Oliver Smith 7a71db4d0a build/graphviz-filter.conf: add config for svgs
Add a custom graphviz-filter.conf, so asciidoc instructs graphviz to
generate svgs.

Related: SYS#6380
Change-Id: Iee54012c41f554608b0915d707f7cf64bfbdc418
2023-03-17 12:41:52 +01:00
Oliver Smith 18ee65de21 build/{diag,mscgen}-filter.conf: png -> svg
Generate svgs instead of pngs. Vector graphics have smaller file size
and don't look blurry when zooming into them.

Related: SYS#6380
Change-Id: I24f345a19adbc5abe41737233f89916996569ea8
2023-03-17 12:30:42 +01:00
Oliver Smith 59d031823d build/Makefile.common.inc: unset OSMO_REPOSITORY
Don't have a default value for OSMO_REPOSITORY, as this leads to manuals
getting uploaded to the wrong directory (publish) target and installed
to the wrong directory (install, uninstall).

Add checks to ensure the variable is set before using it in install and
uninstall.

Related: OS#5902
Change-Id: Ie21d58dd57a893a83f566eea464ab3eec82b67a4
2023-03-07 15:54:40 +01:00
Oliver Smith 2d2d795348 Change upload path to project/master/
Don't upload the manuals for master to "latest" anymore, this is
confusing given that we also refer to the most recent release as
"latest". Add the "master" directory to prepare a directory structure
where we can have manuals for each release:

  osmo-hlr/
  osmo-hlr/master/
  osmo-hlr/master/osmohlr-usermanual.pdf
  osmo-hlr/master/osmohlr-vty-reference.pdf

Related: OS#5902
Change-Id: Id090422afbd7b91ac78cc30e19372ac1c828cb6b
2023-03-07 11:21:27 +00:00
Harald Welte 811f3e8526 build: Switch from rita -> ftp.osmocom.org
We should use service-aliases and not the primary host name, as
that makes migration between machines hard.

Change-Id: Ie139a8cbf2aaa746c0edf6c90a567eb43bc51f45
2021-04-22 11:24:50 +02:00
Vadim Yanitskiy ff86b25a5d Makefile.common.inc: make 'publish' target use $(UPLOAD_FILES)
In some projects, the VTY reference PDFs may be located in sub-
directories.  Let's use $(UPLOAD_FILES), it already contains
the list of all *.pdf files to be uploaded / published.

Change-Id: I7d46dc3b67dee1a91f3ade5a166d833df816abd4
Related: SYS#4937
2020-11-06 17:09:39 +07:00
Vadim Yanitskiy 345738508e Makefile.docbook.inc: generate *.pdf in the given directory
Change-Id: If6d19dd0359239582d41ab3577c4b8bada4c81b8
Related: SYS#4937
2020-11-03 02:55:46 +07:00
Vadim Yanitskiy 2e039c9c12 vty_reference_combine.sh: print the final result to stdout
This is a follow-up change for [1], making this script more
flexible.  It's now a task of the caller to store the merge
results to a file.  This approach allows to merge several
*.xml files and store all the results in a single directory.

Unfortunately, it's impossible to pass the same file as both
input and output to xsltproc, because it would immediately
overwrite its input.  To work this around, create two
temporary files and remove them at the end of the script.

[1] Iabe729af22c235cf9c4b252acda99b43ebcae20c

Change-Id: I6aac73d998c5937894233631e654a160d5623198
Related: SYS#4937
2020-11-02 17:56:52 +00:00
Vadim Yanitskiy 2e5dd3cd3f Makefile.docbook.inc: allow to re-define the include directory
Change-Id: I08481319bbe14c3f45bf38bafa478de239751400
Related: SYS#4937
2020-11-02 17:56:31 +00:00
Vadim Yanitskiy 5be5350c8d Makefile.vty-reference.inc: create 'generated' in this file
Ideally, 'vty_reference_combine.sh' should not create any files
nor directories on its own; it should do exactly what its name
suggests - combine several XML files into a single one.

Let's first make the target directory ('generated') creation a
task of 'Makefile.vty-reference.inc', and then make it output
the results to stdout in a follow-up change.

Change-Id: Iabe729af22c235cf9c4b252acda99b43ebcae20c
Related: SYS#4937
2020-11-02 09:29:59 +00:00
Vadim Yanitskiy 16236cfd4c Makefile.docbook.inc: fix incorrect variable name in documentation
Change-Id: I1d451820fdf8b7d4dd1b48065eaa7617919af392
2020-11-02 09:29:59 +00:00
Neels Hofmeyr d2c6806b0a vty reference: allow reference XML generated at build time
Add variable BUILT_REFERENCE_XML for callers to indicate dependencies for the
VTY reference.

Add script find_existing_path.sh to pick a given path from either builddir or
srcdir, whichever exists.

In Makefile.vty-reference.inc, use find_existing_path.sh to make the VTY
reference build rules work no matter whether the reference.xml is built in
builddir or committed in srcdir.

Change-Id: I613d692328050a036d05b49a436ab495fc2087ba
2020-06-08 11:57:54 +02:00
Neels Hofmeyr db9b39708d fixup: ensure existence of $(abs_srcdir)
Use $(abs_srcdir) if present, or use `realpath $(srcdir)` otherwise.

Previous commit introduced using $(abs_srcdir) instead of $(srcdir), but in
setups with static makefiles (osmo-nitb and osmocom-bb), there is no
$(abs_srcdir) set, which in effect broke their manuals build.

Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57
2020-02-10 12:30:20 +01:00
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
Oliver Smith 0999d41794 Drop python2 and pychart dependencies
Python 2 is EOL at the end of 2019, so don't depend on it anymore.
Remove pychart support, because upstream is dead and there is no python3
version. We were only using it for one graph, and that has been
replaced in osmo-bsc I36b721f895caee9766528e14d854b6aa2a2fac85.

Depends: osmo-bsc I36b721f895caee9766528e14d854b6aa2a2fac85
Related: OS#2819
Change-Id: I57522e57e39682d6d123af4584785d327361e5a3
2019-12-05 16:40:13 +01:00
Oliver Smith a05e5940f1 Support multiple VTY reference manuals
Adjust vty_reference_combine.sh, so we can change the output dir from
"generated" to a subdir inside "generated" when building anything but
the first VTY reference.

Add a generic pattern to Makefile.vty-reference for additional VTY
references, that uses slightly different paths compared to the first VTY
reference, in order to avoid collisions.

Related: OS#4292
Change-Id: I4dea3e07b88175b2a88e577129360af7ec5f87e1
2019-12-03 11:44:57 +01:00
Oliver Smith 6ddd200cda Cosmetic: fix Makefile.vty.reference.inc example
All files listed in VTY_REFERENCE must end in ".xml".

Change-Id: I20abc1899f4bdf0a11482224937217dfddc17c53
2019-12-02 15:54:27 +01:00
Pau Espin de57f626df Fix python-nwdiag dependency on new debian distros
As seen by https://packages.debian.org, python-nwdiag is only available
in buster and older stables, while python3-nwdiag is available in both
old and new releases as well as testing and unstable.

Related: OS#4246
Depends: osmo-ci I0ebee6ac11df779ab954bd6648a0bebefc3350a2
Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
2019-11-22 11:24:16 +01:00
Oliver Smith 5275f262c8 Makefile.asciidoc.inc: warnings check not default
Only check for asciidoc warnings in "make check" if
ASCIIDOC_WARNINGS_CHECK is set. Enable it in jenkins.sh by using the
new ./configure --enable-asciidoc-warnings-check parameter (similar to
--enable-werror in other Osmocom projects' configure.ac files).

Related: OS#4140
Change-Id: Iac993a0d1b17205397a1f1ef1a7bd3f9df739e36
2019-08-05 17:50:35 +00:00
Oliver Smith 2d5d6c54e8 Makefile.asciidoc.inc: always run verbose asciidoc
a2x is a "toolchain manager" for asciidoc, that runs the asciidoc
command internally. Replace the previous logic of first running a2x
without any verbose flags, and on failure running asciidoc standalone,
with a verbose flag, to print the errors the occured. Always run a2x
with -vv, so it runs asciidoc in verbose mode.

This prevents losing the error message in case asciidoc or a2x fail
when running with a2x, but then asciidoc succeeds when running
standalone.

Related: OS#4132
Change-Id: I2cbd2985645ecdecc7851849be6a9a95d4b3246e
2019-08-05 17:50:35 +00:00
Pau Espin 66f7bea317 Makefile.asciidoc.inc: Export commondir attribute to asciidoc files
Otherwise, adoc files in osmo-*/doc/manuals/chapters/*.adoc cannot
include files from osmo-gsm-manuals/common/chapters/*.adoc, since
symbolic link to common/ is only available in builddir, but not in
srcdir.

This way, those files can include commons files like this:
include::{commondir}/chapters/foobar.adoc

Change-Id: Ifc2fdaf1a87d0715213b4eab13c6c9a4f8a987fd
2019-07-19 16:39:13 +02:00
Oliver Smith 5501ba607b Makefile.common.inc: add {,un}install targets
Allow installing generated pdfs with 'make install' in all Osmocom
projects using osmo-gsm-manuals. This makes proper debian packaging of
the manuals easier.

Autotools will automatically run this file's install target, when
running 'make install' in the top source dir. Do not install anything,
when OSMO_GSM_MANUALS_NO_INSTALL is set, and set this variable for the
tests dir, so we don't install the test pdfs.

Related: OS#3899
Change-Id: I66f33172fa410681acbaef4592e9405627948705
2019-04-12 14:32:20 +02:00
Oliver Smith 89e1e74d86 build/unix-time-to-fmt.py: use default python ver
Don't explicitly depend on python 3, so we don't need to have python 2
*and* python 3 installed to build osmo-gsm-manuals.

The script is short and works fine with either python version.

Related: OS#3899
Change-Id: I8af9b8159f5c7e39b905f85edd1584cb4d5a33ef
2019-04-10 14:33:46 +02:00
Oliver Smith d379a0e33c Makefile.common.inc: publish: don't depend on check
The 'check' target is only available when including
Makefile.asciidoc.inc, which is not always the case. Some projects only
build the VTY reference. Do not depend on check, so publishing the
VTY reference for these projects is working as expected.

Related: OS#3385
Change-Id: I64aae0016095d81ca9e9ebda9a2e3336ac126639
2018-12-07 16:01:58 +01:00
Oliver Smith e7446e8810 publish from project repos, not this repo anymore
Do not publish PDFs for all projects anymore with jenkins.sh --publish
or "make publish". Extract known_hosts from jenkins.sh, and install it
along with the other shared files in OSMO_GSM_MANUALS_DIR. Add a
"publish" target to Makefile.common.inc, so we can use it from the
project repositories. Document its usage in INSTALL.txt.

No automatism for building and publishing the documentation of all
projects will be implemented in this patch series, as discussed here:
https://osmocom.org/issues/3385#note-7

(moving manuals to project repositories 19/19)

Related: OS#3385
Change-Id: Ibe0424ceace151115985896b6d43035c69067c50
2018-11-21 14:37:49 +01:00
Oliver Smith 896c7a8c49 vty_reference_combine.sh: chmod xsltproc output
Force the xsltproc output file to be writable, if it exists already.
This is needed for 'make distcheck': xsltproc gives output files the
same permissions as input files. We need to change the output file in
multiple iterations in vty_reference_combine.sh, hence it must be
writable.

(moving manuals to project repositories 15/19)

Related: OS#3385
Change-Id: I693e12ee15665d01cbc50187e6cb3ca74ad0356a
2018-11-21 14:37:49 +01:00
Oliver Smith 99b7cd1775 *.adoc: use {srcdir} for out-of-tree builds
Define a new {srcdir} variable in Makefile.asciidoc.inc, that can be
used in all adoc files. The value is the same as the Makefile variable
$(srcdir). Use {srcdir} in the "include::" lines of all adoc files.

(moving manuals to project repositories 13/19)

Related: OS#3385
Change-Id: I823e3d534cbc9ffceb68d3ab14c9f6710ff2eb2a
2018-11-21 14:37:49 +01:00
Oliver Smith 2682f14611 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
2018-11-21 14:35:03 +01:00
Oliver Smith e388d006f3 Osmo*/Makefile.am: use $(srcdir), $(top_srcdir)
Use $(srcdir) infront of all relative paths, which reference other
files in the repository. Use $(top_srcdir) as OSMO_GSM_MANUALS_DIR.
This is needed for out-of-tree building.

(moving manuals to project repositories 11/19)

Related: OS#3385
Change-Id: I2454d7507fae4e1c47458a1adf36f68e637f4bbc
2018-11-21 14:29:11 +01:00
Oliver Smith 673e2dc481 vty_reference_combine.sh: add *reference.xml arg
Pass the path to $(srcdir)/vty/*reference.xml as parameter to
vty_reference_combine.sh instead of assuming that it will be in
./vty/*reference.xml.

This is necessary to make the build scripts work for out-of-tree
builds. Because when building out-of-tree, the source dir and build dir
(the one where the Makefile gets generated, and in which "make" runs),
are not the same anymore. The relative vty/reference.xml path is only
valid in the source dir, not in the build dir. The next commits in this
series have more changes for out-of-tree builds.

Out-of-tree building is necessary for consistency with the other
Osmocom code, which can be built out-of-tree as well. It would be
strange if this did not work anymore as soon as the users enabled
building the manuals.

(moving manuals to project repositories 10/19)

Related: OS#3385
Change-Id: I3dcb49d7705f882bd117088d4e5eab91dd1c7d8c
2018-11-21 14:29:11 +01:00
Oliver Smith 06d1805c5b *filter.conf/*.sty: use symlinks to build, common
$(OSMO_GSM_MANUALS_DIR) is used in most places to reference to the top
dir, which contains "build" and "common". But not in the asciidoc
mscgen filter configurations, and in the custom LaTeX style. They have
../common or ../build hardcoded, which won't work anymore when the
project specific files will be in another repository.

Update the Makefiles to create symlinks to "build" and "common" in the
dir where the build was started. Use ./common in the files that had
../common hardcoded, and do the same for ./build.

Update the Makefile.common.inc comment to refer to common targets in
general, so we don't need to list each single one there (like the new
'common' and 'build' targets).

I've also thought about using variables there, but this would only work
for the asciidoc files, not for the .sty file. We would need to
generate the latter from another file and replace the variable
dynamically. Having the symlinks instead seemed to be slightly easier.

(moving manuals to project repositories 7/19)

Related: OS#3385
Change-Id: I4cfd1a9ef482d382f10cdf060e8e2cba81852864
2018-11-21 14:29:11 +01:00
Oliver Smith 8d282762d9 cosmetic: update usage of OSMO_GSM_MANUALS_DIR
OSMO_GSM_MANUALS_DIR should use pkg-config to figure out the location
of the shared osmo-gsm-manuals files.

(moving manuals to project repositories 6/19)

Related: OS#3385
Change-Id: I64cfffb5104edcf7a20f41aeb5bf8ee6988b57c4
2018-11-21 14:29:11 +01:00
Oliver Smith 2947683c3a use autotools to add "make install" target
For reasoning why a transition to autotools is desired, see the commit
message of the previous patch in this series.

"make install" copies the "build", "common" dirs, as well as the "*.xsl"
files to $(prefix)/share/osmo-gsm-manuals. Prefix is typically
/usr/local. Also a pkg-config file gets installed, so the path of the
shared files can be looked up by autoconf scripts of the project
repositories. The check-depends script is installed to
$(prefix)/bin/osmo-gsm-manuals-check-depends and will be used by
project specific autoconf scripts, too.

All existing make targets ("make", "make check", "make upload") are
still working, users only need to run "autoreconf -fi" and
"./configure" beforehand.

Makefile.am uses custom install-data-hook and uninstall-local targets,
so we don't need to specify each file of the relevant subdirs in a
_DATA variable (no extra maintenance effort).

(moving manuals to project repositories 5/19)

Related: OS#3385
Change-Id: I8e7036fae062ee783cb132b14608827a82c5e7c7
2018-11-21 14:29:05 +01:00
Oliver Smith dec39cdea9 s/TOPDIR/OSMO_GSM_MANUALS_DIR/g
Replace TOPDIR with OSMO_GSM_MANUALS_DIR. When the project specific
manuals will be built out of this repository, we still need to refer to
the top directory of the shared content. But it will be in another
repository, so we need to rename the variable to avoid confusion.

(moving manuals to project repositories 3/19)

Related: OS#3385
Change-Id: I2af797546de048a6ab19a5cbc755e5e15575d7ab
2018-11-20 17:13:25 +01:00
Oliver Smith 712e2a2e3f make check: properly reference dependencies
Use $(ASCIIDOC_DEPS) instead of assuming that the value would be
"chapters/*.adoc". The variable exists already, but it was not used
yet in 'make check' of  Makefile.asciidoc.inc.

This allows creating a tests dir without its own chapters subdir
(follow-up commit), which is part of a larger effort to move manuals to
project repositories.

The reason for moving manuals to project repositories is that we can
have documentation changes together with code changes in the same
patches. Not part of this patchset, but possible in the future, is
optionally building UNIX man pages in the project repositories
(OS#3386) as well as generating the VTY documentation on the fly from
running the project binaries (OS#3695).

(moving manuals to project repositories 1/19)

Related: OS#3386
Change-Id: Id8b26759607a3490d6cbd93c68ba1f89aa8ef1f2
2018-11-20 17:13:25 +01:00
Oliver Smith 161365fa6f merge_doc.xsl: move from libosmocore.git
Allow building manuals without the libosmocore source.

Related: OS#3385
Change-Id: Ifb81b18422987cdf36b75993d2782abf93b5f48c
2018-11-12 12:18:41 +01:00
Oliver Smith 10ffc82237 unix-time-to-fmt.py: fix crash without argument
Print "unknown" to stdout when unix-time-to-fmt.py was called without
an argument, instead of printing a Python stack trace to stderr. It gets
called that way when building outside of a git folder.

Change-Id: I3ba27cc23543e47cc8a1e494c35cc33f1dc8f297
2018-11-12 11:01:46 +01:00
Oliver Smith e65d9efb31 Makefile.asciidoc.inc: make clean: also rm *.html
HTML files get created when a2x fails and asciidoc runs.

Change-Id: I4d5e9c36f75141ce88d11b16c89809be4dce87d8
2018-11-12 11:01:43 +01:00
Oliver Smith 0b9d46f883 Makefile.asciidoc.inc: always exit 1 on a2x error
a2x wraps asciidoc. When a2x fails, we run asciidoc without a2x to
print verbose output. Make sure that 'make' fails at this point, even
if asciidoc runs through.

Change-Id: I30931303ecc6094efaedcb08380433a34211a169
2018-11-12 10:58:04 +01:00
Max 5625fcf76f Fix build with default paths
If LIBOSMO_DIR is not set explicitly than ~/source/gsm/libosmocore is
used which is base for MERGE_DOC which is used by
vty_reference_combine.sh as it is. If the shell used by
vty_reference_combine.sh does not expand ~ than the build will
fail. Let's be nice and use realpath on MERGE_DOC before giving it to
vty_reference_combine.sh to make sure complete path is used.

Change-Id: I2edf64348502cbe498d9fd27a686c712b044c926
2017-11-20 09:21:47 +00:00