]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
buildsys: don't pull qemu/lxc during doc-generation
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 6 Feb 2017 15:10:07 +0000 (16:10 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 6 Feb 2017 15:10:11 +0000 (16:10 +0100)
src/Makefile
src/PVE/HA/Resources/PVECT.pm
src/PVE/HA/Resources/PVEVM.pm

index aa6fa14d6f7a0122ab704c73eff62a2ae430d5ba..f70f06d32b570bf8a5a87f001788aacb30f4f69e 100644 (file)
@@ -19,15 +19,15 @@ include /usr/share/pve-doc-generator/pve-doc-generator.mk
 all: watchdog-mux
 
 pve-ha-crm.bash-completion:
-       perl -I. -T -e "use PVE::Service::pve_ha_crm; PVE::Service::pve_ha_crm->generate_bash_completions();" >$@.tmp
+       PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::Service::pve_ha_crm; PVE::Service::pve_ha_crm->generate_bash_completions();" >$@.tmp
        mv $@.tmp $@
 
 pve-ha-lrm.bash-completion:
-       perl -I. -T -e "use PVE::Service::pve_ha_lrm; PVE::Service::pve_ha_lrm->generate_bash_completions();" >$@.tmp
+       PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::Service::pve_ha_lrm; PVE::Service::pve_ha_lrm->generate_bash_completions();" >$@.tmp
        mv $@.tmp $@
 
 ha-manager.bash-completion:
-       perl -I. -T -e "use PVE::CLI::ha_manager; PVE::CLI::ha_manager->generate_bash_completions();" >$@.tmp
+       PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::ha_manager; PVE::CLI::ha_manager->generate_bash_completions();" >$@.tmp
        mv $@.tmp $@
 
 watchdog-mux: watchdog-mux.c
@@ -35,9 +35,9 @@ watchdog-mux: watchdog-mux.c
 
 .PHONY: install
 install: watchdog-mux pve-ha-crm pve-ha-lrm ha-manager.1 pve-ha-crm.8 pve-ha-lrm.8 ha-manager.bash-completion pve-ha-lrm.bash-completion pve-ha-crm.bash-completion
-       perl -I. -T -e "use PVE::Service::pve_ha_crm; PVE::Service::pve_ha_crm->verify_api();"
-       perl -I. -T -e "use PVE::Service::pve_ha_lrm; PVE::Service::pve_ha_lrm->verify_api();"
-       perl -I. -T -e "use PVE::CLI::ha_manager; PVE::CLI::ha_manager->verify_api();"
+       PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::Service::pve_ha_crm; PVE::Service::pve_ha_crm->verify_api();"
+       PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::Service::pve_ha_lrm; PVE::Service::pve_ha_lrm->verify_api();"
+       PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::ha_manager; PVE::CLI::ha_manager->verify_api();"
        install -d ${DESTDIR}${SBINDIR}
        install -m 0755 pve-ha-crm ${DESTDIR}${SBINDIR}
        install -m 0755 pve-ha-lrm ${DESTDIR}${SBINDIR}
index d1312abc3647bc442819e06afbf07ce5cf88c347..087df8128bbda66a699fedc0ea13a5ae39a9241b 100644 (file)
@@ -5,10 +5,18 @@ use warnings;
 
 use PVE::HA::Tools;
 
-use PVE::LXC;
-use PVE::LXC::Config;
-use PVE::API2::LXC;
-use PVE::API2::LXC::Status;
+BEGIN {
+    if (!$ENV{PVE_GENERATING_DOCS}) {
+       require PVE::LXC;
+       import  PVE::LXC;
+       require PVE::LXC::Config;
+       import  PVE::LXC::Config;
+       require PVE::API2::LXC;
+       import  PVE::API2::LXC;
+       require PVE::API2::LXC::Status;
+       import  PVE::API2::LXC::Status;
+    }
+}
 
 use base qw(PVE::HA::Resources);
 
index 55d4368a6dede7e6ccee10d7513765728030309f..529d8fb50ea5d6144524b888f963054b2a44ea79 100644 (file)
@@ -5,9 +5,16 @@ use warnings;
 
 use PVE::HA::Tools;
 
-use PVE::QemuConfig;
-use PVE::QemuServer;
-use PVE::API2::Qemu;
+BEGIN {
+    if (!$ENV{PVE_GENERATING_DOCS}) {
+       require PVE::QemuConfig;
+       import  PVE::QemuConfig;
+       require PVE::QemuServer;
+       import  PVE::QemuServer;
+       require PVE::API2::Qemu;
+       import  PVE::API2::Qemu;
+    }
+}
 
 use base qw(PVE::HA::Resources);