[pve-devel] [PATCH manager 4/5] build: use pve-doc-generator for bash-completion

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Oct 17 13:02:04 CEST 2018


and bump build-depends accordingly

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 bin/Makefile   | 14 +++++---------
 debian/control |  2 +-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/bin/Makefile b/bin/Makefile
index 2b56e5cf..761e7f53 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -29,6 +29,10 @@ CLI_MANS = 				\
 	pveperf.1			\
 	pvereport.1			\
 
+BASH_COMPLETIONS = 						\
+	$(addsuffix .service-bash-completion, ${SERVICES}) 	\
+	$(addsuffix .bash-completion, ${CLITOOLS}) 		\
+
 
 all: ${SERVICE_MANS} ${CLI_MANS} pvemailforward
 
@@ -45,19 +49,11 @@ pveversion.1.pod: pveversion
 pveupgrade.1.pod: pveupgrade
 pvereport.1.pod: pvereport
 
-%.service-bash-completion:
-	perl -I.. -T -e "use PVE::Service::$*; PVE::Service::$*->generate_bash_completions();" >$@.tmp
-	mv $@.tmp $@
-
-%.bash-completion:
-	perl -I.. -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
-	mv $@.tmp $@
-
 pvemailforward: pvemailforward.c
 	$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@
 
 .PHONY: install
-install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward $(addsuffix .service-bash-completion, ${SERVICES}) $(addsuffix .bash-completion, ${CLITOOLS})
+install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETIONS}
 	perl -I.. ./pvesh verifyapi
 	for i in ${CLITOOLS}; do perl -I.. -T -e "use PVE::CLI::$$i; PVE::CLI::$$i->verify_api();"; done
 	for i in ${SERVICES}; do perl -I.. -T -e "use PVE::Service::$$i; PVE::Service::$$i->verify_api();"; done
diff --git a/debian/control b/debian/control
index 2695987a..c564ae44 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Build-Depends: debhelper (>= 9~),
                libtest-mockmodule-perl,
                pve-cluster,
                pve-container,
-               pve-doc-generator (>= 5.2-6),
+               pve-doc-generator (>= 5.2-9),
                qemu-server,
                unzip,
 Maintainer: Proxmox Support Team <support at proxmox.com>
-- 
2.19.1





More information about the pve-devel mailing list