mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove the `--no-use-make-mode
` option from sphinx-quickstart
This commit is contained in:
parent
af82d70c60
commit
93842508d2
@ -43,6 +43,12 @@ Incompatible changes
|
|||||||
Patch by Adam Turner.
|
Patch by Adam Turner.
|
||||||
* #12593: Raise an error in :py:func:`!Theme.get_config` for invalid sections.
|
* #12593: Raise an error in :py:func:`!Theme.get_config` for invalid sections.
|
||||||
Patch by Adam Turner.
|
Patch by Adam Turner.
|
||||||
|
* #11693: Remove support for old-style :file:`Makefile` and :file:`make.bat`
|
||||||
|
output in :program:`sphinx-quickstart`.
|
||||||
|
* #11693: Remove the :option:`!--no-use-make-mode`, :option:`!-M`,
|
||||||
|
:option:`!--use-make-mode`, and :option:`!-m` options
|
||||||
|
from :program:`sphinx-quickstart`.
|
||||||
|
Patch by Adam Turner.
|
||||||
|
|
||||||
Deprecated
|
Deprecated
|
||||||
----------
|
----------
|
||||||
|
@ -133,6 +133,10 @@ Options
|
|||||||
.. versionchanged:: 7.3
|
.. versionchanged:: 7.3
|
||||||
Support for disabling the make-mode will be removed in Sphinx 8.
|
Support for disabling the make-mode will be removed in Sphinx 8.
|
||||||
|
|
||||||
|
.. versionremoved:: 8.0
|
||||||
|
The :option:`!--no-use-make-mode` option.
|
||||||
|
The :option:`!--use-make-mode` now has no effect.
|
||||||
|
|
||||||
.. option:: --makefile, --no-makefile
|
.. option:: --makefile, --no-makefile
|
||||||
|
|
||||||
Create (or not create) makefile.
|
Create (or not create) makefile.
|
||||||
|
@ -389,15 +389,8 @@ def generate(
|
|||||||
else:
|
else:
|
||||||
write_file(masterfile, template.render('quickstart/root_doc.rst.jinja', d))
|
write_file(masterfile, template.render('quickstart/root_doc.rst.jinja', d))
|
||||||
|
|
||||||
if d.get('make_mode'):
|
makefile_template = 'quickstart/Makefile.new.jinja'
|
||||||
makefile_template = 'quickstart/Makefile.new.jinja'
|
batchfile_template = 'quickstart/make.bat.new.jinja'
|
||||||
batchfile_template = 'quickstart/make.bat.new.jinja'
|
|
||||||
else:
|
|
||||||
# xref RemovedInSphinx80Warning
|
|
||||||
msg = "Support for '--no-use-make-mode' will be removed in Sphinx 8."
|
|
||||||
print(colorize('red', msg))
|
|
||||||
makefile_template = 'quickstart/Makefile.jinja'
|
|
||||||
batchfile_template = 'quickstart/make.bat.jinja'
|
|
||||||
|
|
||||||
if d['makefile'] is True:
|
if d['makefile'] is True:
|
||||||
d['rsrcdir'] = 'source' if d['sep'] else '.'
|
d['rsrcdir'] = 'source' if d['sep'] else '.'
|
||||||
@ -428,10 +421,6 @@ def generate(
|
|||||||
print(__('where "builder" is one of the supported builders, '
|
print(__('where "builder" is one of the supported builders, '
|
||||||
'e.g. html, latex or linkcheck.'))
|
'e.g. html, latex or linkcheck.'))
|
||||||
print()
|
print()
|
||||||
if not d.get('make_mode'):
|
|
||||||
# xref RemovedInSphinx80Warning
|
|
||||||
msg = "Support for '--no-use-make-mode' will be removed in Sphinx 8."
|
|
||||||
print(colorize('red', msg))
|
|
||||||
|
|
||||||
|
|
||||||
def valid_dir(d: dict) -> bool:
|
def valid_dir(d: dict) -> bool:
|
||||||
@ -527,12 +516,10 @@ def get_parser() -> argparse.ArgumentParser:
|
|||||||
group.add_argument('--no-batchfile', action='store_false',
|
group.add_argument('--no-batchfile', action='store_false',
|
||||||
dest='batchfile',
|
dest='batchfile',
|
||||||
help=__('do not create batchfile'))
|
help=__('do not create batchfile'))
|
||||||
|
# --use-make-mode is a no-op from Sphinx 8.
|
||||||
group.add_argument('-m', '--use-make-mode', action='store_true',
|
group.add_argument('-m', '--use-make-mode', action='store_true',
|
||||||
dest='make_mode', default=True,
|
dest='make_mode', default=True,
|
||||||
help=__('use make-mode for Makefile/make.bat'))
|
help=__('use make-mode for Makefile/make.bat'))
|
||||||
group.add_argument('-M', '--no-use-make-mode', action='store_false',
|
|
||||||
dest='make_mode',
|
|
||||||
help=__('do not use make-mode for Makefile/make.bat'))
|
|
||||||
|
|
||||||
group = parser.add_argument_group(__('Project templating'))
|
group = parser.add_argument_group(__('Project templating'))
|
||||||
group.add_argument('-t', '--templatedir', metavar='TEMPLATEDIR',
|
group.add_argument('-t', '--templatedir', metavar='TEMPLATEDIR',
|
||||||
|
@ -1,98 +0,0 @@
|
|||||||
# Makefile for Sphinx documentation
|
|
||||||
#
|
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
|
||||||
SPHINXOPTS ?=
|
|
||||||
SPHINXBUILD ?= sphinx-build
|
|
||||||
PAPER ?=
|
|
||||||
SOURCEDIR = {{ rsrcdir }}
|
|
||||||
BUILDDIR = {{ rbuilddir }}
|
|
||||||
|
|
||||||
# Internal variables.
|
|
||||||
PAPEROPT_a4 = -D latex_elements.papersize=a4paper
|
|
||||||
PAPEROPT_letter = -D latex_elements.papersize=letterpaper
|
|
||||||
# $(O) is meant as a shortcut for $(SPHINXOPTS)
|
|
||||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(O) $(SOURCEDIR)
|
|
||||||
# the i18n builder cannot share the environment and doctrees with the others
|
|
||||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(O) $(SOURCEDIR)
|
|
||||||
|
|
||||||
.PHONY: help
|
|
||||||
help:
|
|
||||||
@echo "Please use \`make <target>' where <target> is one of"
|
|
||||||
@echo " html to make standalone HTML files"
|
|
||||||
@echo " dirhtml to make HTML files named index.html in directories"
|
|
||||||
@echo " singlehtml to make a single large HTML file"
|
|
||||||
@echo " pickle to make pickle files"
|
|
||||||
@echo " json to make JSON files"
|
|
||||||
@echo " htmlhelp to make HTML files and an HTML help project"
|
|
||||||
@echo " qthelp to make HTML files and a qthelp project"
|
|
||||||
@echo " applehelp to make an Apple Help Book"
|
|
||||||
@echo " devhelp to make HTML files and a Devhelp project"
|
|
||||||
@echo " epub to make an epub"
|
|
||||||
@echo " latex to make LaTeX files (you can set PAPER=a4 or PAPER=letter)"
|
|
||||||
@echo " latexpdf to make LaTeX files and then PDFs out of them"
|
|
||||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
|
||||||
@echo " lualatexpdf to make LaTeX files and run them through lualatex"
|
|
||||||
@echo " xelatexpdf to make LaTeX files and run them through xelatex"
|
|
||||||
@echo " text to make text files"
|
|
||||||
@echo " man to make manual pages"
|
|
||||||
@echo " texinfo to make Texinfo files"
|
|
||||||
@echo " info to make Texinfo files and run them through makeinfo"
|
|
||||||
@echo " gettext to make PO message catalogs"
|
|
||||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
|
||||||
@echo " xml to make Docutils-native XML files"
|
|
||||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
|
||||||
@echo " linkcheck to check all external links for integrity"
|
|
||||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
|
||||||
@echo " coverage to run coverage check of the documentation (if enabled)"
|
|
||||||
@echo " dummy to check syntax errors of document sources"
|
|
||||||
@echo " clean to remove everything in the build directory"
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
rm -rf $(BUILDDIR)
|
|
||||||
|
|
||||||
.PHONY: latexpdf
|
|
||||||
latexpdf:
|
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
||||||
@echo "Running LaTeX files through pdflatex..."
|
|
||||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
|
||||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
||||||
|
|
||||||
.PHONY: latexpdfja
|
|
||||||
latexpdfja:
|
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
||||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
|
||||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
|
||||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
||||||
|
|
||||||
.PHONY: lualatexpdf
|
|
||||||
lualatexpdf:
|
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
||||||
@echo "Running LaTeX files through lualatex..."
|
|
||||||
$(MAKE) PDFLATEX=lualatex -C $(BUILDDIR)/latex all-pdf
|
|
||||||
@echo "lualatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
||||||
|
|
||||||
.PHONY: xelatexpdf
|
|
||||||
xelatexpdf:
|
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
||||||
@echo "Running LaTeX files through xelatex..."
|
|
||||||
$(MAKE) PDFLATEX=xelatex -C $(BUILDDIR)/latex all-pdf
|
|
||||||
@echo "xelatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
||||||
|
|
||||||
.PHONY: info
|
|
||||||
info:
|
|
||||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
|
||||||
@echo "Running Texinfo files through makeinfo..."
|
|
||||||
make -C $(BUILDDIR)/texinfo info
|
|
||||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
|
||||||
|
|
||||||
.PHONY: gettext
|
|
||||||
gettext:
|
|
||||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx
|
|
||||||
.PHONY: Makefile
|
|
||||||
%: Makefile
|
|
||||||
$(SPHINXBUILD) -b "$@" $(ALLSPHINXOPTS) "$(BUILDDIR)/$@"
|
|
||||||
|
|
@ -1,110 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
REM Command file for Sphinx documentation
|
|
||||||
|
|
||||||
pushd %~dp0
|
|
||||||
|
|
||||||
if "%SPHINXBUILD%" == "" (
|
|
||||||
set SPHINXBUILD=sphinx-build
|
|
||||||
)
|
|
||||||
set BUILDDIR={{ rbuilddir }}
|
|
||||||
set SOURCEDIR={{ rsrcdir }}
|
|
||||||
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% %O% %SOURCEDIR%
|
|
||||||
set I18NSPHINXOPTS=%SPHINXOPTS% %SOURCEDIR%
|
|
||||||
if NOT "%PAPER%" == "" (
|
|
||||||
set ALLSPHINXOPTS=-D latex_elements.papersize=%PAPER%paper %ALLSPHINXOPTS%
|
|
||||||
set I18NSPHINXOPTS=-D latex_elements.papersize=%PAPER%paper %I18NSPHINXOPTS%
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "" goto help
|
|
||||||
|
|
||||||
if "%1" == "help" (
|
|
||||||
:help
|
|
||||||
echo.Please use `make ^<target^>` where ^<target^> is one of
|
|
||||||
echo. html to make standalone HTML files
|
|
||||||
echo. dirhtml to make HTML files named index.html in directories
|
|
||||||
echo. singlehtml to make a single large HTML file
|
|
||||||
echo. pickle to make pickle files
|
|
||||||
echo. json to make JSON files
|
|
||||||
echo. htmlhelp to make HTML files and an HTML help project
|
|
||||||
echo. qthelp to make HTML files and a Qt help project
|
|
||||||
echo. devhelp to make HTML files and a Devhelp project
|
|
||||||
echo. epub to make an EPUB
|
|
||||||
echo. latex to make LaTeX files (you can set PAPER=a4 or PAPER=letter)
|
|
||||||
echo. latexpdf to make LaTeX files and then PDFs out of them
|
|
||||||
echo. text to make text files
|
|
||||||
echo. man to make manual pages
|
|
||||||
echo. texinfo to make Texinfo files
|
|
||||||
echo. gettext to make PO message catalogs
|
|
||||||
echo. changes to make an overview over all changed/added/deprecated items
|
|
||||||
echo. xml to make Docutils-native XML files
|
|
||||||
echo. pseudoxml to make pseudoxml-XML files for display purposes
|
|
||||||
echo. linkcheck to check all external links for integrity
|
|
||||||
echo. doctest to run all doctests embedded in the documentation if enabled
|
|
||||||
echo. coverage to run coverage check of the documentation if enabled
|
|
||||||
echo. dummy to check syntax errors of document sources
|
|
||||||
echo. clean to remove everything in the build directory
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "clean" (
|
|
||||||
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
|
||||||
del /q /s %BUILDDIR%\*
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
REM Check if sphinx-build is available and fallback to Python version if any
|
|
||||||
%SPHINXBUILD% 1>NUL 2>NUL
|
|
||||||
if errorlevel 9009 goto sphinx_python
|
|
||||||
goto sphinx_ok
|
|
||||||
|
|
||||||
:sphinx_python
|
|
||||||
|
|
||||||
set SPHINXBUILD=python -m sphinx.__init__
|
|
||||||
%SPHINXBUILD% 2> nul
|
|
||||||
if errorlevel 9009 (
|
|
||||||
echo.
|
|
||||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
||||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
||||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
||||||
echo.may add the Sphinx directory to PATH.
|
|
||||||
echo.
|
|
||||||
echo.If you don't have Sphinx installed, grab it from
|
|
||||||
echo.https://www.sphinx-doc.org/
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
:sphinx_ok
|
|
||||||
|
|
||||||
if "%1" == "latexpdf" (
|
|
||||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
|
||||||
cd %BUILDDIR%/latex
|
|
||||||
make all-pdf
|
|
||||||
cd %~dp0
|
|
||||||
echo.
|
|
||||||
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "latexpdfja" (
|
|
||||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
|
||||||
cd %BUILDDIR%/latex
|
|
||||||
make all-pdf-ja
|
|
||||||
cd %~dp0
|
|
||||||
echo.
|
|
||||||
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "gettext" (
|
|
||||||
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
%SPHINXBUILD% -b %1 %ALLSPHINXOPTS% %BUILDDIR%/%1
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:end
|
|
||||||
popd
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user