]> git.proxmox.com Git - pve-docs.git/commitdiff
pve-doc-generator: add rules for bash-completion
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 17 Oct 2018 11:01:58 +0000 (13:01 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 18 Oct 2018 12:12:20 +0000 (14:12 +0200)
while these are not strictly documentation, they use the same mechanisms
and are generated at the same time as the man pages.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
pve-doc-generator.mk.in

index 893e9f82b37192ec3c8d60d93c354fcbaea6e7ab..0176d852898d3422d74e3ca230b4e8a8f62be3c4 100644 (file)
@@ -45,6 +45,13 @@ ifneq (${DGDIR},.)
        mv $@.tmp $@
 endif
 
+%.service-bash-completion:
+       perl ${PERL_DOC_INC} -T -e "use PVE::Service::$*; PVE::Service::$*->generate_bash_completions();" >$@.tmp
+       mv $@.tmp $@
+
+%.bash-completion:
+       perl ${PERL_DOC_INC} -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
+       mv $@.tmp $@
 
 %-plain.html: %.adoc ${PVE_COMMON_DOC_SOURCES}
        ${ASCIIDOC_PVE} compile-wiki -o $@ $*.adoc