aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-03-20 12:23:36 +0100
committerOliver Smith <osmith@sysmocom.de>2023-03-20 12:28:06 +0100
commit308d7cdf7814860670950c59965db7c7d9263680 (patch)
tree719596c6bccf367faf6f25e5dd645aca303655c8
parent0707b80ad3b8781958da7fd0bef3f0ef38562d12 (diff)
docs/Makefile: don't forward shrink to sphinx
Adjust the catch-all target at the end of the Makefile that is supposed to route all unknown targets to sphinx, so it doesn't do this for the shrink target. The shrink target has recently been added to Makefile.common.inc in osmo-gsm-manuals, which gets included right above the catch-all target. So it isn't an unknown target, but for some reason the sphinx catch-all runs in addition to the shrink target (runs shrink-pdfs.sh, see output below) and fails. As I did not add the catch-all logic, preserve it but add an exception for the shrink rule. Fix for: + make -C docs publish publish-html make: Entering directory '/build/docs' /opt/osmo-gsm-manuals/build/shrink-pdfs.sh _build/latex/osmopysim-usermanual.pdf * _build/latex/osmopysim-usermanual.pdf: 272K (shrunk from 336K) Running Sphinx v5.3.0 Sphinx error: Builder name shrink not registered or available through entry point Related: SYS#6380 Change-Id: If2802bb93909aba90debe5e03f3047cec73e2f54
-rw-r--r--docs/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/Makefile b/docs/Makefile
index 6effe53..3b99b25 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -47,4 +47,6 @@ include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%:
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+ @if [ "$@" != "shrink" ]; then \
+ $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O); \
+ fi