]> git.proxmox.com Git - pve-ha-manager.git/blame - src/Makefile
bump version to 1.0-27
[pve-ha-manager.git] / src / Makefile
CommitLineData
ba878e35
DM
1PACKAGE=pve-ha-manager
2SIMPACKAGE=pve-ha-simulator
3
4PREFIX=/usr
5BINDIR=${PREFIX}/bin
6SBINDIR=${PREFIX}/sbin
7MANDIR=${PREFIX}/share/man
8DOCDIR=${PREFIX}/share/doc/${PACKAGE}
9SIMDOCDIR=${PREFIX}/share/doc/${SIMPACKAGE}
ba878e35 10MAN1DIR=${MANDIR}/man1/
a3cf990d 11BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
ba878e35
DM
12export PERLDIR=${PREFIX}/share/perl5
13
08faa7f0
DM
14# this requires package pve-doc-generator
15export NOVIEW=1
16include /usr/share/pve-doc-generator/pve-doc-generator.mk
ba878e35 17
08faa7f0 18all: watchdog-mux
a802c337
TL
19
20pve-ha-crm.bash-completion:
9fbeceab
DM
21 perl -I. -T -e "use PVE::Service::pve_ha_crm; PVE::Service::pve_ha_crm->generate_bash_completions();" >$@.tmp
22 mv $@.tmp $@
ba878e35 23
e7148ee3 24pve-ha-lrm.bash-completion:
9fbeceab
DM
25 perl -I. -T -e "use PVE::Service::pve_ha_lrm; PVE::Service::pve_ha_lrm->generate_bash_completions();" >$@.tmp
26 mv $@.tmp $@
ba878e35 27
a3cf990d 28ha-manager.bash-completion:
9fbeceab
DM
29 perl -I. -T -e "use PVE::CLI::ha_manager; PVE::CLI::ha_manager->generate_bash_completions();" >$@.tmp
30 mv $@.tmp $@
a3cf990d 31
ba878e35 32watchdog-mux: watchdog-mux.c
f8a3fc80 33 gcc watchdog-mux.c -o watchdog-mux -Wall -Wl,-z,relro
ba878e35
DM
34
35.PHONY: install
08faa7f0 36install: 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
a802c337 37 perl -I. -T -e "use PVE::Service::pve_ha_crm; PVE::Service::pve_ha_crm->verify_api();"
e7148ee3 38 perl -I. -T -e "use PVE::Service::pve_ha_lrm; PVE::Service::pve_ha_lrm->verify_api();"
a3cf990d 39 perl -I. -T -e "use PVE::CLI::ha_manager; PVE::CLI::ha_manager->verify_api();"
ba878e35
DM
40 install -d ${DESTDIR}${SBINDIR}
41 install -m 0755 pve-ha-crm ${DESTDIR}${SBINDIR}
42 install -m 0755 pve-ha-lrm ${DESTDIR}${SBINDIR}
aab4f80b 43 install -m 0755 ha-manager ${DESTDIR}${SBINDIR}
bcde32d4 44 install -m 0755 watchdog-mux ${DESTDIR}${SBINDIR}
a802c337 45 install -m 0644 -D pve-ha-crm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pve-ha-crm
e7148ee3 46 install -m 0644 -D pve-ha-lrm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pve-ha-lrm
a3cf990d 47 install -m 0644 -D ha-manager.bash-completion ${DESTDIR}${BASHCOMPLDIR}/ha-manager
ba878e35
DM
48 make -C PVE install
49 install -d ${DESTDIR}/usr/share/man/man1
08faa7f0
DM
50 install -m 0644 pve-ha-crm.8 ${DESTDIR}/usr/share/man/man1/
51 gzip -9 ${DESTDIR}/usr/share/man/man1/pve-ha-crm.8
52 install -m 0644 pve-ha-lrm.8 ${DESTDIR}/usr/share/man/man1/
53 gzip -9 ${DESTDIR}/usr/share/man/man1/pve-ha-lrm.8
54 install -m 0644 ha-manager.1 ${DESTDIR}/usr/share/man/man1/
55 gzip -9 ${DESTDIR}/usr/share/man/man1/ha-manager.1
ba878e35
DM
56
57.PHONY: installsim
58installsim: pve-ha-simulator
59 install -d ${DESTDIR}${SBINDIR}
60 install -m 0755 pve-ha-simulator ${DESTDIR}${SBINDIR}
61 make -C PVE PERLDIR=${PREFIX}/share/${SIMPACKAGE} installsim
62
ba878e35
DM
63.PHONY: test
64test:
4189699e 65 make -C test test
ba878e35
DM
66
67.PHONY: clean
08faa7f0
DM
68clean:
69 make cleanup-docgen
ba878e35 70 make -C test clean
9fbeceab 71 rm -rf watchdog-mux *.1.pod *.1.gz *.bash-completion *.tmp
ba878e35
DM
72 find . -name '*~' -exec rm {} ';'
73
74.PHONY: distclean
75distclean: clean
76