3 ifeq ($(BUILD_MODE
), release
)
4 COMPILEDIR
:= ..
/target
/release
6 COMPILEDIR
:= ..
/target
/debug
9 GENERATED_SYNOPSIS
:= \
10 proxmox-backup-client
/synopsis.rst
13 proxmox-backup-proxy
.1 \
14 proxmox-backup-client
.1
17 # Sphinx documentation setup
19 SPHINXBUILD
= sphinx-build
23 # Sphinx internal variables.
24 PAPEROPT_a4
= -D latex_paper_size
=a4
25 PAPEROPT_letter
= -D latex_paper_size
=letter
26 ALLSPHINXOPTS
= -d
$(BUILDDIR
)/doctrees
$(PAPEROPT_
$(PAPER
)) $(SPHINXOPTS
) .
27 # the i18n builder cannot share the environment and doctrees with the others
28 I18NSPHINXOPTS
= $(PAPEROPT_
$(PAPER
)) $(SPHINXOPTS
) .
32 # Build manual pages using rst2man
34 proxmox-backup-client
/synopsis.rst
: ${COMPILEDIR}/proxmox-backup-client
35 ${COMPILEDIR}/proxmox-backup-client printdoc
> proxmox-backup-client
/synopsis.rst
38 proxmox-backup-client
.1: proxmox-backup-client
/man1.rst proxmox-backup-client
/description.rst proxmox-backup-client
/synopsis.rst
41 proxmox-backup-proxy
.1: proxmox-backup-proxy
/man1.rst proxmox-backup-proxy
/description.rst
45 html
: ${GENERATED_SYNOPSIS}
46 $(SPHINXBUILD
) -b html
$(ALLSPHINXOPTS
) $(BUILDDIR
)/html
48 @echo
"Build finished. The HTML pages are in $(BUILDDIR)/html."
52 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) $(BUILDDIR
)/latex
53 @echo
"Running LaTeX files through pdflatex..."
54 $(MAKE
) -C
$(BUILDDIR
)/latex all-pdf
55 @echo
"pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
59 $(SPHINXBUILD
) -b epub3
$(ALLSPHINXOPTS
) $(BUILDDIR
)/epub3
61 @echo
"Build finished. The epub3 file is in $(BUILDDIR)/epub3."
64 rm -r
-f
*~
*.1 */synopsis.rst
${BUILDDIR}
66 install: ${MANUAL_PAGES}
67 install -dm755
$(DESTDIR
)$(MAN1DIR
)
68 for i in
${MANUAL_PAGES}; do
install -m755
$$i $(DESTDIR
)$(MAN1DIR
)/ ; done