blob: 550d4e7962f2cfe4be924ade1cbb799c58d7c9ea [file] [log] [blame]
Harald Welte94e87352021-04-02 13:38:00 +02001# Minimal makefile for Sphinx documentation
2#
3
4# You can set these variables from the command line, and also
5# from the environment for the first two.
6SPHINXOPTS ?=
7SPHINXBUILD ?= sphinx-build
8SOURCEDIR = .
9BUILDDIR = _build
10
Harald Weltee4759fd2021-04-11 10:58:30 +020011# for osmo-gsm-manuals
Oliver Smith0529c192022-10-21 16:03:53 +020012OSMO_GSM_MANUALS_DIR ?= $(shell pkg-config osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null)
Harald Weltee4759fd2021-04-11 10:58:30 +020013OSMO_REPOSITORY = "pysim"
14UPLOAD_FILES = $(BUILDDIR)/latex/osmopysim-usermanual.pdf
15CLEAN_FILES = $(UPLOAD_FILES)
16
Harald Welte94e87352021-04-02 13:38:00 +020017# Put it first so that "make" without argument is like "make help".
Harald Weltee4759fd2021-04-11 10:58:30 +020018.PHONY: help
Harald Welte94e87352021-04-02 13:38:00 +020019help:
20 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21
Harald Weltee4759fd2021-04-11 10:58:30 +020022$(BUILDDIR)/latex/pysim.pdf: latexpdf
23 @/bin/true
24
Harald Welte362d2d02022-02-09 21:01:00 +010025publish-html: html
26 rsync -avz -e "ssh -o 'UserKnownHostsFile=$(OSMO_GSM_MANUALS_DIR)/build/known_hosts' -p 48" $(BUILDDIR)/html/ docs@ftp.osmocom.org:web-files/latest/pysim/
27
Harald Weltee4759fd2021-04-11 10:58:30 +020028# put this before the catch-all below
29include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
30
Harald Welte94e87352021-04-02 13:38:00 +020031
32# Catch-all target: route all unknown targets to Sphinx using the new
33# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Harald Weltee4759fd2021-04-11 10:58:30 +020034%:
Harald Welte94e87352021-04-02 13:38:00 +020035 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)