annotate gcc/ada/doc/Makefile @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 # Makefile for Sphinx documentation
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 # You can set these variables from the command line.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
4 SPHINXOPTS = -W
111
kono
parents:
diff changeset
5 SPHINXBUILD = DOC_NAME=$* sphinx-build
kono
parents:
diff changeset
6 PAPER =
kono
parents:
diff changeset
7 BUILDDIR = build
kono
parents:
diff changeset
8 SOURCEDIR = .
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 # Internal variables.
kono
parents:
diff changeset
11 PAPEROPT_a4 = -D latex_paper_size=a4
kono
parents:
diff changeset
12 PAPEROPT_letter = -D latex_paper_size=letter
kono
parents:
diff changeset
13 ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) \
kono
parents:
diff changeset
14 -c $(SOURCEDIR)/share \
kono
parents:
diff changeset
15 -d $(BUILDDIR)/$*/doctrees \
kono
parents:
diff changeset
16 $(SOURCEDIR)
kono
parents:
diff changeset
17 DOC_LIST=gnat_rm gnat_ugn
kono
parents:
diff changeset
18 FMT_LIST=html pdf txt info
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 .PHONY: help clean
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 help:
kono
parents:
diff changeset
23 @echo "Please use \`make <target>' where <target> is one of"
kono
parents:
diff changeset
24 @echo " DOC_NAME.html to make standalone HTML files"
kono
parents:
diff changeset
25 @echo " DOC_NAME.pdf to make LaTeX files and run them through pdflatex"
kono
parents:
diff changeset
26 @echo " DOC_NAME.txt to make text files"
kono
parents:
diff changeset
27 @echo " DOC_NAME.info to make info files"
kono
parents:
diff changeset
28 @echo " DOC_NAME.texinfo to make Texinfo files"
kono
parents:
diff changeset
29 @echo " DOC_NAME.all to build DOC_NAME for all previous formats"
kono
parents:
diff changeset
30 @echo " all to build all documentations in all formats"
kono
parents:
diff changeset
31 @echo " html-all same as previous rule but only for HTML format"
kono
parents:
diff changeset
32 @echo " pdf-all same as previous rule but only for PDF format"
kono
parents:
diff changeset
33 @echo " txt-all same as previous rule but only for text format"
kono
parents:
diff changeset
34 @echo " info-all same as previous rule but only for info format"
kono
parents:
diff changeset
35 @echo " texinfo-all same as previous rule but only for texinfo format"
kono
parents:
diff changeset
36 @echo ""
kono
parents:
diff changeset
37 @echo "DOC_NAME should be a documentation name in the following list:"
kono
parents:
diff changeset
38 @echo " $(DOC_LIST)"
kono
parents:
diff changeset
39 @echo ""
kono
parents:
diff changeset
40 @echo "source and location can be overridden using SOURCEDIR and BUILDDIR variables"
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 clean:
kono
parents:
diff changeset
43 -rm -rf $(BUILDDIR)
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 %.html:
kono
parents:
diff changeset
46 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/$*/html
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 %.pdf:
kono
parents:
diff changeset
49 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/$*/pdf
kono
parents:
diff changeset
50 $(MAKE) -C $(BUILDDIR)/$*/pdf all-pdf LATEXOPTS="-interaction=nonstopmode"
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 %.txt:
kono
parents:
diff changeset
53 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/$*/txt
kono
parents:
diff changeset
54 $(MAKE) -C $(BUILDDIR)/$*/txt plaintext
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 %.info:
kono
parents:
diff changeset
57 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/$*/info
kono
parents:
diff changeset
58 $(MAKE) -C $(BUILDDIR)/$*/info info
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 %.texinfo:
kono
parents:
diff changeset
61 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/$*/texinfo
kono
parents:
diff changeset
62 sed -e 's/^@dircategory/@dircategory GNU Ada Tools/g' < $(BUILDDIR)/$*/texinfo/$*.texi > $(BUILDDIR)/../../$*.texi
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 .PHONY: html-all
kono
parents:
diff changeset
65 html-all: $(foreach doc, $(DOC_LIST), $(doc).html)
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 .PHONY: pdf-all
kono
parents:
diff changeset
68 pdf-all: $(foreach doc, $(DOC_LIST), $(doc).pdf)
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 .PHONY: txt-all
kono
parents:
diff changeset
71 txt-all: $(foreach doc, $(DOC_LIST), $(doc).txt)
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 .PHONY: info-all
kono
parents:
diff changeset
74 info-all: $(foreach doc, $(DOC_LIST), $(doc).info)
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 .PHONY: texinfo-all
kono
parents:
diff changeset
77 texinfo-all: $(foreach doc, $(DOC_LIST), $(doc).texinfo)
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 %.all:
kono
parents:
diff changeset
80 $(MAKE) $(foreach fmt, $(FMT_LIST), $*.$(fmt))
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 .PHONY: all
kono
parents:
diff changeset
83 all: $(foreach fmt, $(FMT_LIST), $(fmt)-all)