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
17 PRUNE_SIMULATOR_FILES
:= \
18 prune-simulator
/index.html \
19 prune-simulator
/documentation.html \
20 prune-simulator
/clear-trigger.png \
21 prune-simulator
/prune-simulator.js
23 # Sphinx documentation setup
25 SPHINXBUILD
= sphinx-build
28 ifeq ($(BUILD_MODE
), release
)
29 COMPILEDIR
:= ..
/target
/release
30 SPHINXOPTS
+= -t release
32 COMPILEDIR
:= ..
/target
/debug
33 SPHINXOPTS
+= -t devbuild
36 # Sphinx internal variables.
37 ALLSPHINXOPTS
= -d
$(BUILDDIR
)/doctrees
$(SPHINXOPTS
) .
41 # Extract backup protocol docs
42 backup-protocol-api.rst
: ${COMPILEDIR}/dump-backup-api
43 ${COMPILEDIR}/dump-backup-api
>$@
45 # Extract reader protocol docs
46 reader-protocol-api.rst
: ${COMPILEDIR}/dump-reader-api
47 ${COMPILEDIR}/dump-backup-api
>$@
49 # Build manual pages using rst2man
51 pxar
/synopsis.rst
: ${COMPILEDIR}/pxar
52 ${COMPILEDIR}/pxar printdoc
> pxar
/synopsis.rst
54 pxar
.1: pxar
/man1.rst pxar
/description.rst pxar
/synopsis.rst
57 proxmox-backup-client
/synopsis.rst
: ${COMPILEDIR}/proxmox-backup-client
58 ${COMPILEDIR}/proxmox-backup-client printdoc
> proxmox-backup-client
/synopsis.rst
60 proxmox-backup-client
/catalog-shell-synopsis.rst
: ${COMPILEDIR}/dump-catalog-shell-cli
61 ${COMPILEDIR}/dump-catalog-shell-cli
> proxmox-backup-client
/catalog-shell-synopsis.rst
63 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
66 proxmox-backup-manager
/synopsis.rst
: ${COMPILEDIR}/proxmox-backup-manager
67 ${COMPILEDIR}/proxmox-backup-manager printdoc
> proxmox-backup-manager
/synopsis.rst
69 proxmox-backup-manager
.1: proxmox-backup-manager
/man1.rst proxmox-backup-manager
/description.rst proxmox-backup-manager
/synopsis.rst
72 proxmox-backup-proxy
.1: proxmox-backup-proxy
/man1.rst proxmox-backup-proxy
/description.rst
75 .PHONY
: onlinehelpinfo
77 @echo
"Generating OnlineHelpInfo.js..."
78 $(SPHINXBUILD
) -b proxmox-scanrefs
$(ALLSPHINXOPTS
) $(BUILDDIR
)/scanrefs
79 @echo
"Build finished. OnlineHelpInfo.js is in $(BUILDDIR)/scanrefs."
82 html
: ${GENERATED_SYNOPSIS} images
/proxmox-logo.svg custom.css conf.py
${PRUNE_SIMULATOR_FILES}
83 $(SPHINXBUILD
) -b html
$(ALLSPHINXOPTS
) $(BUILDDIR
)/html
84 install -m
0644 custom.js custom.css images
/proxmox-logo.svg
$(BUILDDIR
)/html
/_static
/
85 install -dm
0755 $(BUILDDIR
)/html
/prune-simulator
86 install -m
0644 ${PRUNE_SIMULATOR_FILES} $(BUILDDIR
)/html
/prune-simulator
88 @echo
"Build finished. The HTML pages are in $(BUILDDIR)/html."
91 latexpdf
: ${GENERATED_SYNOPSIS}
92 @echo
"Requires python3-sphinx, texlive-xetex, xindy and texlive-fonts-extra"
93 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) $(BUILDDIR
)/latex
94 @echo
"Running LaTeX files through xelatex..."
95 $(MAKE
) -C
$(BUILDDIR
)/latex all-pdf
96 @echo
"xelatex finished; the PDF files are in $(BUILDDIR)/latex."
99 epub3
: ${GENERATED_SYNOPSIS}
100 $(SPHINXBUILD
) -b epub3
$(ALLSPHINXOPTS
) $(BUILDDIR
)/epub3
102 @echo
"Build finished. The epub3 file is in $(BUILDDIR)/epub3."
105 rm -r
-f
*~
*.1 ${BUILDDIR} ${GENERATED_SYNOPSIS}
108 install_manual_pages
: ${MANUAL_PAGES}
109 install -dm755
$(DESTDIR
)$(MAN1DIR
)
110 for i in
${MANUAL_PAGES}; do
install -m755
$$i $(DESTDIR
)$(MAN1DIR
)/ ; done
113 install -dm755
$(DESTDIR
)$(DOCDIR
)
114 rsync
-a
${BUILDDIR}/html
$(DESTDIR
)$(DOCDIR
)
116 install_pdf
: latexpdf
117 install -dm755
$(DESTDIR
)$(DOCDIR
)
118 install -m
0644 output
/latex
/ProxmoxBackup.pdf
$(DESTDIR
)$(DOCDIR
)/proxmox-backup.pdf
120 ifneq ($(filter nodoc
,$(DEB_BUILD_PROFILES
)),)
122 install: install_manual_pages
126 install: install_manual_pages install_html install_pdf