From aef4f9cdf6fb5bbeabf7897d346e21fbb244cf5d Mon Sep 17 00:00:00 2001 From: Stephen McDowell Date: Sun, 31 Mar 2019 02:13:31 -0700 Subject: [PATCH] Closes #1368: Enable CLI override of Makefile variables. --- sphinx/templates/quickstart/Makefile.new_t | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sphinx/templates/quickstart/Makefile.new_t b/sphinx/templates/quickstart/Makefile.new_t index 16a9d482f..7532398b2 100644 --- a/sphinx/templates/quickstart/Makefile.new_t +++ b/sphinx/templates/quickstart/Makefile.new_t @@ -1,11 +1,14 @@ # Minimal makefile for Sphinx documentation # -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SOURCEDIR = {{ rsrcdir }} -BUILDDIR = {{ rbuilddir }} +# You can set these variables from the command line. For example: +# SPHINXOPTS='-E -W -n' make html +# will run the html builder in a clean environment (-E), treating warnings +# as errors (-W), in nitpicky mode (-n). +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR ?= {{ rsrcdir }} +BUILDDIR ?= {{ rbuilddir }} # Put it first so that "make" without argument is like "make help". help: @@ -17,3 +20,4 @@ help: # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) +