godot/doc/Makefile
风青山 ed0e6e87fd Fix translation po file not found when make rst
The parsed language parameters contain unstripped spaces. This will
generate a wrong path.

Provide a `TOOLSOPT` to allow overriding the default values of
parameters of the `make_rst.py` script.

The xml generated by `godot --doctool -l LANG` can be checked for
errors using `make xml-check LANGARG=LANG`, which may be useful for
checking errors in po files.
2023-11-19 11:29:46 +08:00

32 lines
798 B
Makefile

BASEDIR = .
CLASSES = "$(BASEDIR)/classes/" "$(BASEDIR)/../modules/" "$(BASEDIR)/../platform/"
OUTPUTDIR = $(BASEDIR)/_build
TOOLSDIR = $(BASEDIR)/tools
JSDIR = "$(BASEDIR)/../platform/web"
LANGARG ?= en
TOOLSOPT ?=
.ONESHELL:
clean:
rm -rf "$(OUTPUTDIR)"
doxygen:
rm -rf "$(OUTPUTDIR)/doxygen"
mkdir -p "$(OUTPUTDIR)/doxygen"
doxygen Doxyfile
rst:
rm -rf "$(OUTPUTDIR)/rst"
mkdir -p "$(OUTPUTDIR)/rst"
python3 "$(TOOLSDIR)/make_rst.py" -o "$(OUTPUTDIR)/rst" -l "$(LANGARG)" $(TOOLSOPT) $(CLASSES)
xml-check:
python3 "$(TOOLSDIR)/make_rst.py" --dry-run -l "$(LANGARG)" $(TOOLSOPT) $(CLASSES)
rstjs:
rm -rf "$(OUTPUTDIR)/rstjs"
mkdir -p "$(OUTPUTDIR)/rstjs"
npm --prefix "$(JSDIR)" ci
npm --prefix "$(JSDIR)" run docs -- --destination "$(OUTPUTDIR)/rstjs/html5_shell_classref.rst"