3 GENERATED_SYNOPSIS
:= \
4 proxmox-backup-client
/synopsis.rst \
5 proxmox-backup-client
/catalog-shell-synopsis.rst \
6 proxmox-backup-manager
/synopsis.rst \
8 backup-protocol-api.rst \
9 reader-protocol-api.rst
13 proxmox-backup-proxy
.1 \
14 proxmox-backup-client
.1 \
15 proxmox-backup-manager
.1
18 # Sphinx documentation setup
20 SPHINXBUILD
= sphinx-build
23 ifeq ($(BUILD_MODE
), release
)
24 COMPILEDIR
:= ..
/target
/release
25 SPHINXOPTS
+= -t release
27 COMPILEDIR
:= ..
/target
/debug
28 SPHINXOPTS
+= -t devbuild
31 # Sphinx internal variables.
32 ALLSPHINXOPTS
= -d
$(BUILDDIR
)/doctrees
$(SPHINXOPTS
) .
36 # Extract backup protocol docs
37 backup-protocol-api.rst
: ${COMPILEDIR}/dump-backup-api
38 ${COMPILEDIR}/dump-backup-api
>$@
40 # Extract reader protocol docs
41 reader-protocol-api.rst
: ${COMPILEDIR}/dump-reader-api
42 ${COMPILEDIR}/dump-backup-api
>$@
44 # Build manual pages using rst2man
46 pxar
/synopsis.rst
: ${COMPILEDIR}/pxar
47 ${COMPILEDIR}/pxar printdoc
> pxar
/synopsis.rst
49 pxar
.1: pxar
/man1.rst pxar
/description.rst pxar
/synopsis.rst
52 proxmox-backup-client
/synopsis.rst
: ${COMPILEDIR}/proxmox-backup-client
53 ${COMPILEDIR}/proxmox-backup-client printdoc
> proxmox-backup-client
/synopsis.rst
55 proxmox-backup-client
/catalog-shell-synopsis.rst
: ${COMPILEDIR}/dump-catalog-shell-cli
56 ${COMPILEDIR}/dump-catalog-shell-cli
> proxmox-backup-client
/catalog-shell-synopsis.rst
58 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
61 proxmox-backup-manager
/synopsis.rst
: ${COMPILEDIR}/proxmox-backup-manager
62 ${COMPILEDIR}/proxmox-backup-manager printdoc
> proxmox-backup-manager
/synopsis.rst
64 proxmox-backup-manager
.1: proxmox-backup-manager
/man1.rst proxmox-backup-manager
/description.rst proxmox-backup-manager
/synopsis.rst
67 proxmox-backup-proxy
.1: proxmox-backup-proxy
/man1.rst proxmox-backup-proxy
/description.rst
70 .PHONY
: onlinehelpinfo
72 @echo
"Generating OnlineHelpInfo.js..."
73 $(SPHINXBUILD
) -b proxmox-scanrefs
$(ALLSPHINXOPTS
) $(BUILDDIR
)/scanrefs
74 @echo
"Build finished. OnlineHelpInfo.js is in $(BUILDDIR)/scanrefs."
77 html
: ${GENERATED_SYNOPSIS}
78 $(SPHINXBUILD
) -b html
$(ALLSPHINXOPTS
) $(BUILDDIR
)/html
80 @echo
"Build finished. The HTML pages are in $(BUILDDIR)/html."
83 latexpdf
: ${GENERATED_SYNOPSIS}
84 @echo
"Requires python3-sphinx, texlive-xetex, xindy and texlive-fonts-extra"
85 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) $(BUILDDIR
)/latex
86 @echo
"Running LaTeX files through xelatex..."
87 $(MAKE
) -C
$(BUILDDIR
)/latex all-pdf
88 @echo
"xelatex finished; the PDF files are in $(BUILDDIR)/latex."
91 epub3
: ${GENERATED_SYNOPSIS}
92 $(SPHINXBUILD
) -b epub3
$(ALLSPHINXOPTS
) $(BUILDDIR
)/epub3
94 @echo
"Build finished. The epub3 file is in $(BUILDDIR)/epub3."
97 rm -r
-f
*~
*.1 ${BUILDDIR} ${GENERATED_SYNOPSIS}
100 install_manual_pages
: ${MANUAL_PAGES}
101 install -dm755
$(DESTDIR
)$(MAN1DIR
)
102 for i in
${MANUAL_PAGES}; do
install -m755
$$i $(DESTDIR
)$(MAN1DIR
)/ ; done
105 install -dm755
$(DESTDIR
)$(DOCDIR
)
106 rsync
-a
${BUILDDIR}/html
$(DESTDIR
)$(DOCDIR
)
108 install_pdf
: latexpdf
109 install -dm755
$(DESTDIR
)$(DOCDIR
)
110 install -m
0644 output
/latex
/ProxmoxBackup.pdf
$(DESTDIR
)$(DOCDIR
)/proxmox-backup.pdf
112 ifneq ($(filter nodoc
,$(DEB_BUILD_PROFILES
)),)
114 install: install_manual_pages
118 install: install_manual_pages install_html install_pdf