diff options
Diffstat (limited to 'lang/python/doc/Makefile.am')
-rw-r--r-- | lang/python/doc/Makefile.am | 54 |
1 files changed, 39 insertions, 15 deletions
diff --git a/lang/python/doc/Makefile.am b/lang/python/doc/Makefile.am index 3abc9e66..f88c9c11 100644 --- a/lang/python/doc/Makefile.am +++ b/lang/python/doc/Makefile.am @@ -17,32 +17,56 @@ # License along with this program; if not, see <https://gnu.org/licenses/>. # SPDX-License-Identifier: LGPL-2.1-or-later -# Created by: -# find . -type f -print | sed 's/^.\// /;$q;s/$/ \\/' | sort -EXTRA_DIST = texinfo/what-was-new.texi \ - meta/old-commits.log \ - meta/TODO.org \ - README \ +EXTRA_DIST = README \ rst/_build/README \ + rst/_static/README \ + rst/_templates/README \ rst/conf.py \ rst/gpgme-python-howto.rst \ rst/index.rst \ rst/maintenance-mode.rst \ rst/short-history.rst \ - rst/_static/README \ - rst/_templates/README \ rst/what-is-new.rst \ rst/what-was-new.rst \ - src/gpgme-python-howto \ - src/index \ - src/maintenance-mode \ - src/short-history \ - src/what-is-new \ - src/what-was-new \ + src/gpgme-python-howto.org \ + src/index.org \ + src/maintenance-mode.org \ + src/short-history.org \ + src/what-is-new.org \ + src/what-was-new.org \ + texinfo/texinfo.tex \ texinfo/gpgme-python-howto.texi \ texinfo/index.texi \ texinfo/maintenance-mode.texi \ texinfo/short-history.texi \ - texinfo/texinfo.tex \ texinfo/what-is-new.texi \ texinfo/what-was-new.texi + +if MAINTAINER_MODE +dist-hook: the_doc_dirs $(RST_GENERATED) $(TEXI_GENERATED) + cp $(RST_GENERATED) rst/ + cp $(TEXI_GENERATED) texinfo/ + +.org.rst: + pandoc -f org -t rst $< -o $@ + +.org.texi: + pandoc -f org -t texinfo $< -o $@ + +RST_GENERATED = src/gpgme-python-howto.rst src/index.rst \ + src/maintenance-mode.rst src/short-history.rst src/what-is-new.rst \ + src/what-was-new.rst + +TEXI_GENERATED = src/gpgme-python-howto.texi src/index.texi \ + src/maintenance-mode.texi src/short-history.texi src/what-is-new.texi \ + src/what-was-new.texi + +# make 'src', 'rst' and 'texinfo' dir in build directory +.PHONY: the_doc_dirs +the_doc_dirs: + if test ! -d src; then $(MKDIR_P) src; fi + if test ! -d rst; then $(MKDIR_P) rst; fi + if test ! -d texinfo; then $(MKDIR_P) texinfo; fi +endif + +MAINTAINERCLEANFILES = $(RST_GENERATED) $(TEXI_GENERATED) |