mirror of
https://github.com/chipsec/chipsec
synced 2026-06-08 13:31:00 +00:00
8ff8f1827e
With the switch to argparse a number of small issues were seen in the exported PDF. This script cleans up some of the formatting issues by moving the options output to a preformatted/code section. Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
54 lines
1.3 KiB
Batchfile
54 lines
1.3 KiB
Batchfile
@echo off
|
|
if "%1" == "" goto usage
|
|
set TARGET=%1
|
|
|
|
echo "************************ BUILDING DOCUMENTATION ******************************"
|
|
echo "** Target: %TARGET%
|
|
echo "******************************************************************************"
|
|
|
|
set PYTHONPATH=%TARGET%
|
|
|
|
pushd %TARGET%
|
|
call python chipsec_main.py -h > %TARGET%\docs\sphinx\options.rst
|
|
popd
|
|
|
|
pushd %TARGET%\docs\sphinx
|
|
:: Update options.rst to make it a preformatted block
|
|
call python options.py
|
|
|
|
call sphinx-apidoc -e -f -T -o modules %TARGET%
|
|
call python removeStrRst.py
|
|
|
|
:: Clean up files that we do not want to process into documenation
|
|
del .\modules\chipsec_tools.*
|
|
del .\modules\tests.*
|
|
del .\modules\setup.rst
|
|
del .\modules\chipsec.rst
|
|
del .\modules\chipsec.cfg.common.rst
|
|
del .\modules\chipsec.chipset.rst
|
|
del .\modules\chipsec.command.rst
|
|
del .\modules\chipsec.defines.rst
|
|
del .\modules\chipsec.file.rst
|
|
del .\modules\chipsec.logger.rst
|
|
del .\modules\chipsec.module.rst
|
|
del .\modules\chipsec.module_common.rst
|
|
del .\modules\chipsec.result_deltas.rst
|
|
del .\modules\chipsec.testcase.rst
|
|
del .\modules\chipsec_main.rst
|
|
del .\modules\chipsec_util.rst
|
|
|
|
:: create chipsec-manual.pdf
|
|
call sphinx-build -b pdf -D pdf_stylesheets=sstylesheet . %TARGET%
|
|
popd
|
|
|
|
:: remove sphinx folder
|
|
pushd %TARGET%
|
|
rmdir /s /q %TARGET%\.doctrees
|
|
popd
|
|
|
|
goto end
|
|
|
|
:usage
|
|
echo Usage: create_manual.cmd [CHIPSEC_PATH]
|
|
|
|
:end |