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.texinfo to make Texinfo files"
28 @echo
" DOC_NAME.info to make info 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
" texinfo-all same as previous rule but only for texinfo format"
35 @echo
" info-all same as previous rule but only for info format"
37 @echo
"DOC_NAME should be a documentation name in the following list:"
40 @echo
"source and location can be overriden using SOURCEDIR and BUILDDIR variables"
43 -rm -rf
$(BUILDDIR
)/*/html \
49 $(SPHINXBUILD
) -b html
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/html
52 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/pdf
53 cp
$(SOURCEDIR
)/share
/sphinx.sty
$(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
65 $(SPHINXBUILD
) -b texinfo
$(ALLSPHINXOPTS
) $(BUILDDIR
)/$*/texinfo
66 sed
-e
's/^@dircategory/@dircategory GNU Ada Tools/g' < $(BUILDDIR
)/$*/texinfo
/$*.texi
> $(BUILDDIR
)/..
/..
/$*.texi
68 html-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).html
)
70 pdf-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).pdf
)
72 txt-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).txt
)
74 texinfo-all
: $(foreach doc
, $(DOC_LIST
), $(doc
).texinfo
)
77 $(MAKE
) $(foreach fmt
, $(FMT_LIST
), $*.
$(fmt
))
79 all: $(foreach fmt
, $(FMT_LIST
), $(fmt
).
all)