forked from qgis/pyqgis-api-docs-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (48 loc) · 2.16 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#/***************************************************************************
#
# QGIS Python Documentation Generator
# -------------------
# begin : 2017-04-14
# copyright : (C) 2017 by Tim Sutton
# email : [email protected]
# ***************************************************************************/
#
#/***************************************************************************
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU General Public License as published by *
# * the Free Software Foundation; either version 2 of the License, or *
# * (at your option) any later version. *
# * *
# ***************************************************************************/
#
# Original Makefile generated by Sphinx
#
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = QGIS
QGISVERSION = master
BUILDDIR = build/${QGISVERSION}
SOURCEDIR = api/${QGISVERSION}
# Following variables should be sent when making
# QGISVERSION might be override by doing make prepare QGISVERSION=3.2
# SPHINX_RTD_EGG_PATH can be used to provide a custom version of sphinx_rtd_theme to support versioning
OS := $(shell uname)
ifeq ($(OS), Darwin)
SED = 'gsed'
else
SED = 'sed'
endif
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -c $(SOURCEDIR) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
prepare:
${SED} -r 's/__QGISVERSION__/${QGISVERSION}/g; s/__QGISVERSIONLIST__/${QGISVERSIONLIST}/; s/__PYQGISURL__/${PYQGISURL}/' conf.py.in > $(SOURCEDIR)/conf.py
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)