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
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"
46 $(SPHINXBUILD
) -b html
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/html
49 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/pdf
50 $(MAKE
) -C
$(BUILDDIR
)/$*/pdf all-pdf LATEXOPTS
="-interaction=nonstopmode"
53 $(SPHINXBUILD
) -b texinfo
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/txt
54 $(MAKE
) -C
$(BUILDDIR
)/$*/txt plaintext
57 $(SPHINXBUILD
) -b texinfo
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/info
58 $(MAKE
) -C
$(BUILDDIR
)/$*/info info
61 $(SPHINXBUILD
) -b texinfo
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/texinfo
62 sed
-e
's/^@dircategory/@dircategory GNU Ada Tools/g' < $(BUILDDIR
)/$*/texinfo
/$*.texi
> $(BUILDDIR
)/..
/..
/$*.texi
65 html-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).html
)
68 pdf-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).pdf
)
71 txt-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).txt
)
74 info-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).
info)
77 texinfo-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).texinfo
)
80 $(MAKE
) $(foreach fmt
, $(FMT_LIST
), $*.
$(fmt
))
83 all: $(foreach fmt
, $(FMT_LIST
), $(fmt
)-all)