aboutsummaryrefslogtreecommitdiff
path: root/docs/Makefile
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2020-12-13 15:30:47 +0100
committerKristian Evers <kristianevers@gmail.com>2020-12-13 15:30:47 +0100
commitc3efbd23a5bf26f1dfd5bc55ae3488d5665ace98 (patch)
treea204df79f7057d7d420bf7c5358791347617b9cd /docs/Makefile
parent126445148d3b742c7f4e31f5f65857be59c48340 (diff)
parent6857d1a4a8eb6fcb7b88b0339413913ba2c3351a (diff)
downloadPROJ-c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98.tar.gz
PROJ-c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98.zip
Merge remote-tracking branch 'osgeo/master'
Diffstat (limited to 'docs/Makefile')
-rw-r--r--docs/Makefile27
1 files changed, 26 insertions, 1 deletions
diff --git a/docs/Makefile b/docs/Makefile
index b9fa8257..22399302 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,18 +4,43 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
+HTMLOPTS ?= -W
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
+.PHONY: clean
+clean:
+ rm -rf $(BUILDDIR)/*
+ rm -rf .doxygen_up_to_date
+
+.doxygen_up_to_date:
+ ../scripts/doxygen.sh
+ touch .doxygen_up_to_date
+
+.PHONY: html
+html: .doxygen_up_to_date
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(HTMLOPTS) $(BUILDDIR)/html
+ # Undoes the hack done in scripts/doxygen.sh
+ @sed "s/io::Convention_/io::Convention/g" < $(BUILDDIR)/html/development/reference/cpp/io.html | sed "s/>Convention_/>Convention/g" | sed "s/_WKT2/WKT2/g" | sed "s/_WKT1/WKT1/g" > $(BUILDDIR)/html/development/reference/cpp/io.html.tmp
+ @mv $(BUILDDIR)/html/development/reference/cpp/io.html.tmp $(BUILDDIR)/html/development/reference/cpp/io.html
+ # Undoes the hacks of scripts/generate_breathe_friendly_general_doc.py
+ @sed "s/<em class=\"property\">namespace <\/em>//g" < $(BUILDDIR)/html/development/reference/cpp/cpp_general.html > $(BUILDDIR)/html/development/reference/cpp/cpp_general.html.tmp
+ @mv $(BUILDDIR)/html/development/reference/cpp/cpp_general.html.tmp $(BUILDDIR)/html/development/reference/cpp/cpp_general.html
+ @cp -r ../schemas $(BUILDDIR)/html/schemas
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+
# 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)
-