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-client
/catalog-shell-synopsis.rst \
12 proxmox-backup-manager
/synopsis.rst \
14 backup-protocol-api.rst \
15 reader-protocol-api.rst
19 proxmox-backup-proxy
.1 \
20 proxmox-backup-client
.1 \
21 proxmox-backup-manager
.1
24 # Sphinx documentation setup
26 SPHINXBUILD
= sphinx-build
29 # Sphinx internal variables.
30 ALLSPHINXOPTS
= -d
$(BUILDDIR
)/doctrees
$(SPHINXOPTS
) .
34 # Extract backup protocol docs
35 backup-protocol-api.rst
: ${COMPILEDIR}/dump-backup-api
36 ${COMPILEDIR}/dump-backup-api
>$@
38 # Extract reader protocol docs
39 reader-protocol-api.rst
: ${COMPILEDIR}/dump-reader-api
40 ${COMPILEDIR}/dump-backup-api
>$@
42 # Build manual pages using rst2man
44 pxar
/synopsis.rst
: ${COMPILEDIR}/pxar
45 ${COMPILEDIR}/pxar printdoc
> pxar
/synopsis.rst
47 pxar
.1: pxar
/man1.rst pxar
/description.rst pxar
/synopsis.rst
50 proxmox-backup-client
/synopsis.rst
: ${COMPILEDIR}/proxmox-backup-client
51 ${COMPILEDIR}/proxmox-backup-client printdoc
> proxmox-backup-client
/synopsis.rst
53 proxmox-backup-client
/catalog-shell-synopsis.rst
: ${COMPILEDIR}/dump-catalog-shell-cli
54 ${COMPILEDIR}/dump-catalog-shell-cli
> proxmox-backup-client
/catalog-shell-synopsis.rst
56 proxmox-backup-client
.1: proxmox-backup-client
/man1.rst proxmox-backup-client
/description.rst proxmox-backup-client
/synopsis.rst proxmox-backup-client
/catalog-shell-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 @echo
"Requires python3-sphinx, texlive-xetex, xindy and texlive-fonts-extra"
77 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) $(BUILDDIR
)/latex
78 @echo
"Running LaTeX files through xelatex..."
79 $(MAKE
) -C
$(BUILDDIR
)/latex all-pdf
80 @echo
"xelatex finished; the PDF files are in $(BUILDDIR)/latex."
83 epub3
: ${GENERATED_SYNOPSIS}
84 $(SPHINXBUILD
) -b epub3
$(ALLSPHINXOPTS
) $(BUILDDIR
)/epub3
86 @echo
"Build finished. The epub3 file is in $(BUILDDIR)/epub3."
89 rm -r
-f
*~
*.1 ${BUILDDIR} ${GENERATED_SYNOPSIS}
92 install_manual_pages
: ${MANUAL_PAGES}
93 install -dm755
$(DESTDIR
)$(MAN1DIR
)
94 for i in
${MANUAL_PAGES}; do
install -m755
$$i $(DESTDIR
)$(MAN1DIR
)/ ; done
97 install -dm755
$(DESTDIR
)$(DOCDIR
)
98 rsync
-a
${BUILDDIR}/html
$(DESTDIR
)$(DOCDIR
)
100 install_pdf
: latexpdf
101 install -dm755
$(DESTDIR
)$(DOCDIR
)
102 install -m
0644 output
/latex
/ProxmoxBackup.pdf
$(DESTDIR
)$(DOCDIR
)/proxmox-backup.pdf
104 ifneq ($(filter nodoc
,$(DEB_BUILD_PROFILES
)),)
106 install: install_manual_pages
110 install: install_manual_pages install_html install_pdf