3 ifeq ($(BUILD_MODE
), release
)
4 COMPILEDIR
:= ..
/target
/release
6 COMPILEDIR
:= ..
/target
/debug
9 GENERATED_SYNOPSIS
:= \
10 proxmox-backup-client
/synopsis.rst \
11 proxmox-backup-manager
/synopsis.rst \
12 backup-protocol-api.rst \
13 reader-protocol-api.rst
17 proxmox-backup-proxy
.1 \
18 proxmox-backup-client
.1 \
19 proxmox-backup-manager
.1
22 # Sphinx documentation setup
24 SPHINXBUILD
= sphinx-build
28 # Sphinx internal variables.
29 PAPEROPT_a4
= -D latex_paper_size
=a4
30 PAPEROPT_letter
= -D latex_paper_size
=letter
31 ALLSPHINXOPTS
= -d
$(BUILDDIR
)/doctrees
$(PAPEROPT_
$(PAPER
)) $(SPHINXOPTS
) .
32 # the i18n builder cannot share the environment and doctrees with the others
33 I18NSPHINXOPTS
= $(PAPEROPT_
$(PAPER
)) $(SPHINXOPTS
) .
37 # Extract backup protocol docs
38 backup-protocol-api.rst
: ${COMPILEDIR}/dump-backup-api
39 ${COMPILEDIR}/dump-backup-api
>$@
41 # Extract reader protocol docs
42 reader-protocol-api.rst
: ${COMPILEDIR}/dump-reader-api
43 ${COMPILEDIR}/dump-backup-api
>$@
45 # Build manual pages using rst2man
47 pxar
/synopsis.rst
: ${COMPILEDIR}/pxar
48 ${COMPILEDIR}/pxar printdoc
> pxar
/synopsis.rst
50 pxar
.1: pxar
/man1.rst pxar
/description.rst pxar
/synopsis.rst
53 proxmox-backup-client
/synopsis.rst
: ${COMPILEDIR}/proxmox-backup-client
54 ${COMPILEDIR}/proxmox-backup-client printdoc
> proxmox-backup-client
/synopsis.rst
56 proxmox-backup-client
.1: proxmox-backup-client
/man1.rst proxmox-backup-client
/description.rst proxmox-backup-client
/synopsis.rst
59 proxmox-backup-manager
/synopsis.rst
: ${COMPILEDIR}/proxmox-backup-manager
60 ${COMPILEDIR}/proxmox-backup-manager printdoc
> proxmox-backup-manager
/synopsis.rst
62 proxmox-backup-manager
.1: proxmox-backup-manager
/man1.rst proxmox-backup-manager
/description.rst proxmox-backup-manager
/synopsis.rst
65 proxmox-backup-proxy
.1: proxmox-backup-proxy
/man1.rst proxmox-backup-proxy
/description.rst
69 html
: ${GENERATED_SYNOPSIS}
70 $(SPHINXBUILD
) -b html
$(ALLSPHINXOPTS
) $(BUILDDIR
)/html
72 @echo
"Build finished. The HTML pages are in $(BUILDDIR)/html."
75 latexpdf
: ${GENERATED_SYNOPSIS}
76 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) $(BUILDDIR
)/latex
77 @echo
"Running LaTeX files through pdflatex..."
78 $(MAKE
) -C
$(BUILDDIR
)/latex all-pdf
79 @echo
"pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
82 epub3
: ${GENERATED_SYNOPSIS}
83 $(SPHINXBUILD
) -b epub3
$(ALLSPHINXOPTS
) $(BUILDDIR
)/epub3
85 @echo
"Build finished. The epub3 file is in $(BUILDDIR)/epub3."
88 rm -r
-f
*~
*.1 ${BUILDDIR} ${GENERATED_SYNOPSIS}
90 install: ${MANUAL_PAGES}
91 install -dm755
$(DESTDIR
)$(MAN1DIR
)
92 for i in
${MANUAL_PAGES}; do
install -m755
$$i $(DESTDIR
)$(MAN1DIR
)/ ; done