blob: 234a48c10dd04f8cbebdf22a424a9d4f67557e02 [file] [log] [blame]
Neels Hofmeyr1ed4bb42017-10-19 05:11:57 +02001TOPDIR = ..
Neels Hofmeyr25dd7852017-09-25 16:37:34 +02002
Neels Hofmeyr1ed4bb42017-10-19 05:11:57 +02003ASCIIDOC = osmohlr-usermanual.adoc
4ASCIIDOC_DEPS = chapters/*.adoc *.vty *.ctrl
Neels Hofmeyr25dd7852017-09-25 16:37:34 +02005include $(TOPDIR)/build/Makefile.asciidoc.inc
Neels Hofmeyr25dd7852017-09-25 16:37:34 +02006
Neels Hofmeyr1ed4bb42017-10-19 05:11:57 +02007VTY_REFERENCE = osmohlr-vty-reference.xml
8include $(TOPDIR)/build/Makefile.vty-reference.inc
Neels Hofmeyr25dd7852017-09-25 16:37:34 +02009
Neels Hofmeyr1ed4bb42017-10-19 05:11:57 +020010include $(TOPDIR)/build/Makefile.common.inc
Neels Hofmeyr8f725ae2017-10-24 14:31:13 +020011
12OSMO_HLR_PATH ?= ../../osmo-hlr
13TMP_DB = generated/hlr.db
14
15update-examples: update-examples-ctrl update-examples-vty
16
17.PHONY: found-update-deps
18found-update-deps:
19 @if [ ! -f "$(OSMO_HLR_PATH)/sql/hlr.sql" ]; then \
20 echo "You need to define OSMO_HLR_PATH to point at an osmo-hlr.git"; \
21 exit 1; \
22 fi
23 @if [ -z "$(shell which osmo-hlr)" ]; then \
24 echo "osmo-hlr needs to be installed / available in the PATH"; \
25 exit 1; \
26 fi
27 @if [ -z "$(shell which osmo_verify_transcript_ctrl.py)" ]; then \
28 echo "You need to install git.osmocom.org/python/osmo-python-tests.git"; \
29 exit 1; \
30 fi
31 @if [ -z "$(shell which osmo_verify_transcript_vty.py)" ]; then \
32 echo "You need to install git.osmocom.org/python/osmo-python-tests.git"; \
33 exit 1; \
34 fi
35
36update-examples-ctrl: found-update-deps
37 mkdir -p generated
38 rm -f "$(TMP_DB)"
39 sqlite3 "$(TMP_DB)" < "$(OSMO_HLR_PATH)/sql/hlr.sql"
40 sqlite3 "$(TMP_DB)" < "$(OSMO_HLR_PATH)/tests/test_subscriber.sql"
41 osmo_verify_transcript_ctrl.py \
42 -r "osmo-hlr -l $(TMP_DB) -c /n/s/osmo/src/osmo-hlr/doc/examples/osmo-hlr.cfg" \
43 -p 4259 --update *.ctrl
44
45update-examples-vty: found-update-deps
46 mkdir -p generated
47 rm -f "$(TMP_DB)"
48 sqlite3 "$(TMP_DB)" < "$(OSMO_HLR_PATH)/sql/hlr.sql"
49 osmo_verify_transcript_vty.py \
50 -r "osmo-hlr -l $(TMP_DB) -c /n/s/osmo/src/osmo-hlr/doc/examples/osmo-hlr.cfg" \
51 -p 4258 --update *.vty