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 |
| 12 | OSMO_GSM_MANUALS_DIR=$(shell pkg-config osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null) |
| 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 | |
| 25 | # put this before the catch-all below |
| 26 | include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc |
| 27 | |
Harald Welte | 94e8735 | 2021-04-02 13:38:00 +0200 | [diff] [blame] | 28 | |
| 29 | # Catch-all target: route all unknown targets to Sphinx using the new |
| 30 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). |
Harald Welte | e4759fd | 2021-04-11 10:58:30 +0200 | [diff] [blame] | 31 | %: |
Harald Welte | 94e8735 | 2021-04-02 13:38:00 +0200 | [diff] [blame] | 32 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |