File: Makefile

package info (click to toggle)
gprbuild 2021.0.0.0778b109-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,776 kB
  • sloc: ada: 70,235; makefile: 452; sh: 396; python: 222; ansic: 151; cpp: 89; fortran: 62; xml: 13
file content (63 lines) | stat: -rw-r--r-- 1,743 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Makefile for Sphinx documentation

# You can set these variables from the command line.
SPHINXOPTS    =
SPHINXBUILD   = sphinx-build
PAPER         =
BUILDDIR      = .
SOURCEDIR     = .

# Internal variables.
PAPEROPT_a4     = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS   = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) \
		  -c $(SOURCEDIR)/share \
		  -d $(BUILDDIR)/$*/doctrees \
		  $(SOURCEDIR)
FMT_LIST=html txt info pdf
DOC_NAME=gprbuild_ug
CP=cp

.PHONY: help clean

all: $(foreach fmt, $(FMT_LIST), $(fmt))

help:
	@echo "Please use \`make <target>' where <target> is one of"
	@echo "  html       to make standalone HTML files"
	@echo "  pdf        to make LaTeX files and run them through pdflatex"
	@echo "  txt        to make text files"
	@echo "  texinfo    to make Texinfo files"
	@echo "  info       to make info files"
	@echo "  all                 to build documentation in all formats"
	@echo ""
	@echo "source and location can be overriden using SOURCEDIR and BUILDDIR variables"

clean:
	-rm -rf $(BUILDDIR)/html \
		$(BUILDDIR)/pdf \
		$(BUILDDIR)/txt \
		$(BUILDDIR)/info \
		$(BUILDDIR)/doctrees \
		share/__pycache__

html: force
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

pdf: force
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/pdf
	cp $(SOURCEDIR)/share/sphinx.sty $(BUILDDIR)/pdf
	$(MAKE) -C $(BUILDDIR)/pdf all-pdf LATEXOPTS="-interaction=nonstopmode"

txt: force
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/$*/txt
	$(MAKE) -C $(BUILDDIR)/txt plaintext

info: force
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/$*/info
	$(MAKE) -C $(BUILDDIR)/info info

texinfo:
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/$*/texinfo

force: