OpenDroneMap-docs/Makefile

73 wiersze
3.4 KiB
Makefile

2018-03-11 16:49:17 +00:00
# makefile for Sphinx documentation
# =================================
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = OpenDroneMap
SOURCEDIR = source
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# this is for testing, it will only build the EN version of the docs
livehtml:
sphinx-autobuild --open-browser --host 0.0.0.0 -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)/html"
2021-06-11 20:57:07 +00:00
# this will update `arguments.rst` to match arguments in the ODM code
# add any individual file for an argument missing from `source/arguments_edit/`
# update the files in `source/arguments/` including adding in
# all user contributed content from files in `source/arguments_edit/`
autogenerate:
2021-07-06 16:25:09 +00:00
python scripts/extract_odm_strings.py https://raw.githubusercontent.com/OpenDroneMap/ODM/master/opendm/config.py
# update main EN pot files that serve as the source for translation process
updatepot:
@$(SPHINXBUILD) -b gettext "$(SOURCEDIR)" "source/locale/pot"
# update the po files for each target language from the EN pot files
updatelangpo:
2023-01-30 16:00:00 +00:00
sphinx-intl update --pot-dir "source/locale/pot" --language cs,es,fil,fr,id,sw,te
# push new and changed strings to Transifex
pushlang:
2021-06-11 20:57:07 +00:00
tx push --source
# push translated strings from Transifex
pulllang:
2023-01-30 16:00:00 +00:00
tx pull --language "cs,es,fil,fr,id,sw,te"
2021-06-11 20:57:07 +00:00
2021-07-06 16:25:09 +00:00
build:
@$(SPHINXBUILD) -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)/html" -nW
2023-01-30 16:00:00 +00:00
@$(SPHINXBUILD) -b dirhtml -D language='cs' "$(SOURCEDIR)" "$(BUILDDIR)/html/cs" -nW
@$(SPHINXBUILD) -b dirhtml -D language='es' "$(SOURCEDIR)" "$(BUILDDIR)/html/es" -nW
@$(SPHINXBUILD) -b dirhtml -D language='fil' "$(SOURCEDIR)" "$(BUILDDIR)/html/fil" -nW
2023-01-30 16:00:00 +00:00
@$(SPHINXBUILD) -b dirhtml -D language='fr' "$(SOURCEDIR)" "$(BUILDDIR)/html/fr" -nW
2021-11-16 15:50:09 +00:00
@$(SPHINXBUILD) -b dirhtml -D language='id' "$(SOURCEDIR)" "$(BUILDDIR)/html/id" -nW
2023-01-30 16:00:00 +00:00
@$(SPHINXBUILD) -b dirhtml -D language='sw' "$(SOURCEDIR)" "$(BUILDDIR)/html/sw" -nW
@$(SPHINXBUILD) -b dirhtml -D language='te' "$(SOURCEDIR)" "$(BUILDDIR)/html/te" -nW
2018-03-11 18:33:15 +00:00
# -n Run in nit-picky mode. Currently, this generates warnings for all missing references.
# -W Turn warnings into errors that stop the build.
2020-07-21 18:08:54 +00:00
# for more details about the options see https://www.sphinx-doc.org/en/1.8/man/sphinx-build.html#options
2018-03-11 16:49:17 +00:00
2021-06-11 20:57:07 +00:00
# `allerr` runs without nit-picky mode, so that an error doesn't halt the build
# it will log all errors that need to be fixed in the translations (generally syntax errors)
allerr:
@$(SPHINXBUILD) -v -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)/html"
2023-01-30 16:00:00 +00:00
@$(SPHINXBUILD) -v -b dirhtml -D language='cs' "$(SOURCEDIR)" "$(BUILDDIR)/html/cs"
@$(SPHINXBUILD) -v -b dirhtml -D language='es' "$(SOURCEDIR)" "$(BUILDDIR)/html/es"
@$(SPHINXBUILD) -v -b dirhtml -D language='fil' "$(SOURCEDIR)" "$(BUILDDIR)/html/fil"
2023-01-30 16:00:00 +00:00
@$(SPHINXBUILD) -v -b dirhtml -D language='fr' "$(SOURCEDIR)" "$(BUILDDIR)/html/fr"
2021-11-16 15:50:09 +00:00
@$(SPHINXBUILD) -v -b dirhtml -D language='id' "$(SOURCEDIR)" "$(BUILDDIR)/html/id"
2023-01-30 16:00:00 +00:00
@$(SPHINXBUILD) -v -b dirhtml -D language='sw' "$(SOURCEDIR)" "$(BUILDDIR)/html/sw"
@$(SPHINXBUILD) -v -b dirhtml -D language='te' "$(SOURCEDIR)" "$(BUILDDIR)/html/te"
2018-03-11 16:49:17 +00:00
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
2019-05-22 18:35:33 +00:00
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)