diff options
author | Georg Brandl <georg@python.org> | 2014-01-11 19:36:05 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-01-11 19:36:05 +0100 |
commit | 91d92be8adae2e44e1e23e1c07b7088c35261abf (patch) | |
tree | 80127b8a18ea75e91efaeb5b547e6cd60aa5bb7e /sphinx-build.py | |
parent | 1f83f01adfd3709dbce0059469b01d5078715a31 (diff) | |
download | sphinx-git-91d92be8adae2e44e1e23e1c07b7088c35261abf.tar.gz |
Add "make mode" to sphinx-build, invoked by the -M flag.
This is intended to do almost all of what the quickstart-generated Makefile
and make.bat did, but within Sphinx. The advantages are:
* no duplication between Unix and Windows files
* updates and fixes are propagated (the generated makefiles never update)
* more Python code, less shell code!
Diffstat (limited to 'sphinx-build.py')
-rwxr-xr-x | sphinx-build.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx-build.py b/sphinx-build.py index 6737d0729..54bdb5293 100755 --- a/sphinx-build.py +++ b/sphinx-build.py @@ -11,5 +11,8 @@ import sys if __name__ == '__main__': - from sphinx import main - sys.exit(main(sys.argv)) + from sphinx import main, make_main + if sys.argv[1:2] == ['-M']: + sys.exit(make_main(sys.argv)) + else: + sys.exit(main(sys.argv)) |