Makefile options not overridable from command line

minusf avatarminusf created an issue

doc/Makefile states:

# You can set these variables from the command line.

However to make the variables overridable from the command line, the assignments must be changed:

--- Makefile.orig       Fri Jan 31 18:02:10 2014
+++ Makefile    Fri Jan 31 18:02:33 2014
@@ -2,11 +2,11 @@
 #

 # You can set these variables from the command line.
-SPHINXOPTS   =
-SPHINXBUILD  = python ../sphinx-build.py
-SPHINXPROJ   = sphinx
-SOURCEDIR    = .
-BUILDDIR     = _build
+SPHINXOPTS  ?=
+SPHINXBUILD ?= python ../sphinx-build.py
+SPHINXPROJ  ?= sphinx
+SOURCEDIR   ?= .
+BUILDDIR    ?= _build

 # Has to be explicit, otherwise we don't get "make" without targets right.
 help:

This is also an issue in every project that adopts this Makefile.

Comments (2)

  1. minusf

    i just realised this should be fixed in sphinx.quickstart.MAKEFILE

    while we are here, is the new doc/Makefile an indication of what will happen to sphinx.quickstart.MAKEFILE? I am asking because the new Makefile works only with GNU make (BSD make does not recognise % as a catchall target :( so it would be nice to keep it like it is...

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.