blob: 9e1295a3f4a265e5f862f34462ec4292ecc8e8a6 [file] [log] [blame]
Oliver Smithf08da242018-11-14 10:47:01 +01001EXTRA_DIST = example_subscriber_add_update_delete.vty \
2 example_subscriber_cs_ps_enabled.ctrl \
3 example_subscriber_info.ctrl \
4 osmohlr-usermanual.adoc \
5 osmohlr-usermanual-docinfo.xml \
6 osmohlr-vty-reference.xml \
7 chapters \
8 vty
9
10if BUILD_MANUALS
11 ASCIIDOC = osmohlr-usermanual.adoc
12 ASCIIDOC_DEPS = $(srcdir)/chapters/*.adoc $(srcdir)/*.vty $(srcdir)/*.ctrl
13 include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.inc
14
15 VTY_REFERENCE = osmohlr-vty-reference.xml
16 include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
17
Oliver Smitha8253a52019-05-21 15:31:53 +020018 OSMO_REPOSITORY = osmo-hlr
Oliver Smithf08da242018-11-14 10:47:01 +010019 include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
20endif
21
22TMP_DB = generated/hlr.db
23
24update-examples: update-examples-ctrl update-examples-vty
25
26.PHONY: found-update-deps
27found-update-deps:
28 @if [ ! -f "$(top_srcdir)/sql/hlr.sql" ]; then \
29 echo "You need to define OSMO_HLR_PATH to point at an osmo-hlr.git"; \
30 exit 1; \
31 fi
32 @if [ -z "$(shell which osmo-hlr)" ]; then \
33 echo "osmo-hlr needs to be installed / available in the PATH"; \
34 exit 1; \
35 fi
36 @if [ -z "$(shell which osmo_verify_transcript_ctrl.py)" ]; then \
37 echo "You need to install git.osmocom.org/python/osmo-python-tests.git"; \
38 exit 1; \
39 fi
40 @if [ -z "$(shell which osmo_verify_transcript_vty.py)" ]; then \
41 echo "You need to install git.osmocom.org/python/osmo-python-tests.git"; \
42 exit 1; \
43 fi
44
45update-examples-ctrl: found-update-deps
46 mkdir -p generated
47 rm -f "$(TMP_DB)"
48 sqlite3 "$(TMP_DB)" < "$(top_srcdir)/sql/hlr.sql"
49 sqlite3 "$(TMP_DB)" < "$(top_srcdir)/tests/test_subscriber.sql"
50 osmo_verify_transcript_ctrl.py \
51 -r "osmo-hlr -l $(TMP_DB) -c $(top_srcdir)/doc/examples/osmo-hlr.cfg" \
52 -p 4259 --update *.ctrl
53
54update-examples-vty: found-update-deps
55 mkdir -p generated
56 rm -f "$(TMP_DB)"
57 sqlite3 "$(TMP_DB)" < "$(top_srcdir)/sql/hlr.sql"
58 osmo_verify_transcript_vty.py \
59 -r "osmo-hlr -l $(TMP_DB) -c $(top_srcdir)/doc/examples/osmo-hlr.cfg" \
60 -p 4258 --update *.vty