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 | e3f0fcef07d5fdd1bf4e6201e1c03e8c7a75adb7 (patch) | |
tree | 80127b8a18ea75e91efaeb5b547e6cd60aa5bb7e /sphinx-build.py | |
parent | afd5ef6d4d926c827bf28f09fbe89d4f02d4f6ae (diff) | |
download | sphinx-e3f0fcef07d5fdd1bf4e6201e1c03e8c7a75adb7.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 6737d072..54bdb529 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)) |