doc/manuals: integrate into this repository

Update .gitignore and make the manuals build without a toplevel
configure.ac file from autotools:

$ cd doc/manuals
$ make

Related: OS#3385
Change-Id: Ifc2349bc2855b55cc1e603b79dc769c55a110aa1
This commit is contained in:
Oliver Smith 2018-11-29 10:39:16 +01:00 committed by Neels Hofmeyr
parent 43fb867c78
commit 9fd173b179
3 changed files with 38 additions and 4 deletions

10
.gitignore vendored
View File

@ -31,3 +31,13 @@ core.*
/.project
/.settings/
# manuals
doc/manuals/*.html
doc/manuals/*.svg
doc/manuals/*.pdf
doc/manuals/*__*.png
doc/manuals/*.check
doc/manuals/generated/
doc/manuals/osmocombb-usermanual.xml
doc/manuals/common
doc/manuals/build

View File

@ -1,7 +1,5 @@
OSMO_GSM_MANUALS_DIR = $(top_srcdir)
EXTRA_DIST = osmocombb-usermanual.adoc \
osmocombb-usermanual-docinfo.xml \
chapters
OSMO_GSM_MANUALS_DIR := $(shell ./osmo-gsm-manuals-dir.sh)
srcdir=$(CURDIR)
ASCIIDOC = osmocombb-usermanual.adoc
ASCIIDOC_DEPS = $(srcdir)/chapters/*.adoc

View File

@ -0,0 +1,26 @@
#!/bin/sh -e
# Find OSMO_GSM_MANUALS_DIR and print it to stdout. Print where it was taken from to stderr.
# Find it in env, pkg-conf and ../../../osmo-gsm-manuals
RET="$OSMO_GSM_MANUALS_DIR"
if [ -n "$RET" ]; then
RET="$(realpath $RET)"
echo "OSMO_GSM_MANUALS_DIR: $RET (from env)" >&2
else
RET="$(pkg-config osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null || true)"
if [ -n "$RET" ]; then
echo "OSMO_GSM_MANUALS_DIR: $RET (from pkg-conf)" >&2
else
RET="$(realpath $(realpath $(dirname $0))/../../../osmo-gsm-manuals)"
echo "OSMO_GSM_MANUALS_DIR: $RET (fallback)" >&2
fi
fi
# Print the result or error message
if [ -d "$RET" ]; then
echo "$RET"
else
echo "ERROR: OSMO_GSM_MANUALS_DIR does not exist!" >&2
echo "Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR." >&2
exit 1
fi