Harald Welte | 94e8735 | 2021-04-02 13:38:00 +0200 | [diff] [blame] | 1 | # 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. |
| 6 | SPHINXOPTS ?= |
| 7 | SPHINXBUILD ?= sphinx-build |
| 8 | SOURCEDIR = . |
| 9 | BUILDDIR = _build |
| 10 | |
Harald Welte | e4759fd | 2021-04-11 10:58:30 +0200 | [diff] [blame] | 11 | # for osmo-gsm-manuals |
Oliver Smith | 0529c19 | 2022-10-21 16:03:53 +0200 | [diff] [blame] | 12 | OSMO_GSM_MANUALS_DIR ?= $(shell pkg-config osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null) |
Harald Welte | e4759fd | 2021-04-11 10:58:30 +0200 | [diff] [blame] | 13 | OSMO_REPOSITORY = "pysim" |
| 14 | UPLOAD_FILES = $(BUILDDIR)/latex/osmopysim-usermanual.pdf |
| 15 | CLEAN_FILES = $(UPLOAD_FILES) |
| 16 | |
Harald Welte | 94e8735 | 2021-04-02 13:38:00 +0200 | [diff] [blame] | 17 | # Put it first so that "make" without argument is like "make help". |
Harald Welte | e4759fd | 2021-04-11 10:58:30 +0200 | [diff] [blame] | 18 | .PHONY: help |
Harald Welte | 94e8735 | 2021-04-02 13:38:00 +0200 | [diff] [blame] | 19 | help: |
| 20 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
| 21 | |
Harald Welte | e4759fd | 2021-04-11 10:58:30 +0200 | [diff] [blame] | 22 | $(BUILDDIR)/latex/pysim.pdf: latexpdf |
| 23 | @/bin/true |
| 24 | |
Harald Welte | 362d2d0 | 2022-02-09 21:01:00 +0100 | [diff] [blame] | 25 | publish-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 Welte | e4759fd | 2021-04-11 10:58:30 +0200 | [diff] [blame] | 28 | # put this before the catch-all below |
| 29 | include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc |
| 30 | |
Harald Welte | 94e8735 | 2021-04-02 13:38:00 +0200 | [diff] [blame] | 31 | |
| 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 Welte | e4759fd | 2021-04-11 10:58:30 +0200 | [diff] [blame] | 34 | %: |
Harald Welte | 94e8735 | 2021-04-02 13:38:00 +0200 | [diff] [blame] | 35 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |