abhilekhsingh / gc3pie

Automatically exported from code.google.com/p/gc3pie
0 stars 0 forks source link

`make html` succeeds if `sphinx-build` is not on the $PATH #367

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Ensure that the program `sphinx-build` is *not* available
2. cd gc3pie/docs
3. make html

What is the expected output? What do you see instead?

If `sphinx-build` is not available, then an error message should be
printed, as the documentation cannot be rebuilt.

Instead, the Python interpreter is called with the current directory
as an argument, and it just complains that the file `__main__.py` is
missing, which is misleading.  If the file `__main__.py` is created
with empty content, then it just succeeds, which is even more
misleading.

The culprit is the following line at the beginning of the
Sphinx-generated `Makefile`:

        SPHINXBUILD = python $(shell which sphinx-build)

Since `which sphinx-build` returns the empty string for non-existing
commands, `$SPHINXBUILD` expands to just `Python` and that generates
the above programs.

A check should be done that `$SPHINXBUILD` really is the Sphinx
builder command before attempting documentation rebuild.

Original issue reported on code.google.com by riccardo.murri@gmail.com on 10 Jan 2013 at 2:47

GoogleCodeExporter commented 9 years ago
Fixed in SVN r3216

Original comment by riccardo.murri@gmail.com on 18 Jan 2013 at 9:50