summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2018-11-29 10:42:34 +0100
committerOliver Smith <osmith@sysmocom.de>2018-11-29 10:42:34 +0100
commit5ed6f6ce11f0480544f2878518afd24785eb2721 (patch)
treeb7329efdcd0564ff9bc5728e36025b4fd5df005c /doc
parent41af859af6f431292209fcd1276223085d03be79 (diff)
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: I5916bc7e656b508fc74917e79841ce7e1ee4981b
Diffstat (limited to 'doc')
-rw-r--r--doc/manuals/Makefile (renamed from doc/manuals/Makefile.am)6
-rwxr-xr-xdoc/manuals/osmo-gsm-manuals-dir.sh26
2 files changed, 28 insertions, 4 deletions
diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile
index 4301ab9..0730411 100644
--- a/doc/manuals/Makefile.am
+++ b/doc/manuals/Makefile
@@ -1,7 +1,5 @@
-OSMO_GSM_MANUALS_DIR = $(top_srcdir)
-EXTRA_DIST = osmo-gsm-tester-manual.adoc \
- osmo-gsm-tester-manual-docinfo.xml \
- chapters
+OSMO_GSM_MANUALS_DIR := $(shell ./osmo-gsm-manuals-dir.sh)
+srcdir=$(CURDIR)
ASCIIDOC = osmo-gsm-tester-manual.adoc
ASCIIDOC_DEPS = $(srcdir)/chapters/*.adoc
diff --git a/doc/manuals/osmo-gsm-manuals-dir.sh b/doc/manuals/osmo-gsm-manuals-dir.sh
new file mode 100755
index 0000000..f132eaa
--- /dev/null
+++ b/doc/manuals/osmo-gsm-manuals-dir.sh
@@ -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