1 # Makefile for Sphinx documentation
3 # You can set these variables from the command line.
5 SPHINXBUILD
= DOC_NAME
=$* sphinx-build
11 PAPEROPT_a4
= -D latex_paper_size
=a4
12 PAPEROPT_letter
= -D latex_paper_size
=letter
13 ALLSPHINXOPTS
= $(PAPEROPT_
$(PAPER
)) $(SPHINXOPTS
) \
14 -c
$(SOURCEDIR
)/share \
15 -d
$(BUILDDIR
)/$*/doctrees \
17 DOC_LIST
=gnat_rm gnat_ugn gnat-style
18 FMT_LIST
=html pdf txt
info
23 @echo
"Please use \`make <target>' where <target> is one of"
24 @echo
" DOC_NAME.html to make standalone HTML files"
25 @echo
" DOC_NAME.pdf to make LaTeX files and run them through pdflatex"
26 @echo
" DOC_NAME.txt to make text files"
27 @echo
" DOC_NAME.info to make info files"
28 @echo
" DOC_NAME.texinfo to make Texinfo files"
29 @echo
" DOC_NAME.all to build DOC_NAME for all previous formats"
30 @echo
" all to build all documentations in all formats"
31 @echo
" html-all same as previous rule but only for HTML format"
32 @echo
" pdf-all same as previous rule but only for PDF format"
33 @echo
" txt-all same as previous rule but only for text format"
34 @echo
" info-all same as previous rule but only for info format"
35 @echo
" texinfo-all same as previous rule but only for texinfo format"
37 @echo
"DOC_NAME should be a documentation name in the following list:"
40 @echo
"source and location can be overridden using SOURCEDIR and BUILDDIR variables"
47 mkdir
-p share
/_static
50 $(SPHINXBUILD
) -b html
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/html
53 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/pdf
54 $(MAKE
) -C
$(BUILDDIR
)/$*/pdf all-pdf LATEXOPTS
="-interaction=nonstopmode"
57 $(SPHINXBUILD
) -b texinfo
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/txt
58 $(MAKE
) -C
$(BUILDDIR
)/$*/txt plaintext
61 $(SPHINXBUILD
) -b texinfo
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/info
62 $(MAKE
) -C
$(BUILDDIR
)/$*/info info
64 %.texinfo
: mk_empty_dirs
65 $(SPHINXBUILD
) -b texinfo
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/texinfo
66 sed
-e
's/^@dircategory/@dircategory GNU Ada Tools/g' < $(BUILDDIR
)/$*/texinfo
/$*.texi
> $(BUILDDIR
)/..
/..
/$*.texi
69 html-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).html
)
72 pdf-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).pdf
)
75 txt-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).txt
)
78 info-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).
info)
81 texinfo-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).texinfo
)
84 $(MAKE
) $(foreach fmt
, $(FMT_LIST
), $*.
$(fmt
))
87 all: $(foreach fmt
, $(FMT_LIST
), $(fmt
)-all)