]> git.proxmox.com Git - pve-container.git/blame - src/Makefile
add lxc-pve-poststop-hook and move vm_stop_cleanup
[pve-container.git] / src / Makefile
CommitLineData
f76a2828
DM
1PACKAGE=pve-container
2
3PREFIX=${DESTDIR}/usr
4BINDIR=${PREFIX}/bin
5SBINDIR=${PREFIX}/sbin
6MANDIR=${PREFIX}/share/man
7DOCDIR=${PREFIX}/share/doc/${PACKAGE}
bf9f492f
DM
8LXC_SCRIPT_DIR=${PREFIX}/share/lxc
9LXC_TMPL_DIR=${LXC_SCRIPT_DIR}/templates
10LXC_HOOK_DIR=${LXC_SCRIPT_DIR}/hooks
11LXC_COMMON_CONFIG_DIR=${LXC_SCRIPT_DIR}/config/common.conf.d
f76a2828
DM
12PODDIR=${DOCDIR}/pod
13MAN1DIR=${MANDIR}/man1/
81bee809 14MAN5DIR=${MANDIR}/man5/
f76a2828
DM
15export PERLDIR=${PREFIX}/share/perl5
16
17all:
18
19%.1.gz: %.1.pod
20 rm -f $@
21 cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@
22
81bee809
DM
23%.5.gz: %.5.pod
24 rm -f $@
25 cat $<|pod2man -n $* -s 5 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@
26
f76a2828 27pct.1.pod: pct
1c7f4f65 28 perl -I. -T ./pct printmanpod >$@
f76a2828 29
81bee809
DM
30pct.conf.5.pod: gen-pct-conf-pod.pl PVE/LXC.pm
31 perl -I. ./gen-pct-conf-pod.pl >$@
32
93285df8
DM
33lxc-pve-mount-hook.1.pod: lxc-pve-mount-hook
34 perl -I. -T ./lxc-pve-mount-hook printmanpod >$@
35
32e6d659
AD
36lxc-pve-poststop-hook.1.pod: lxc-pve-poststop-hook
37 perl -I. -T ./lxc-pve-poststop-hook printmanpod >$@
38
f76a2828 39.PHONY: install
32e6d659 40install: pct lxc-pve.conf lxc-pve-mount-hook lxc-pve-poststop-hook lxcnetaddbr lxc-pve-mount-hook.1.pod lxc-pve-mount-hook.1.gz lxc-pve-poststop-hook.1.pod lxc-pve-poststop-hook.1.gz pct.1.pod pct.1.gz pct.conf.5.pod pct.conf.5.gz pve-update-lxc-config
f76a2828 41 perl -T -I. ./pct verifyapi
f76a2828
DM
42 install -d ${SBINDIR}
43 install -m 0755 pct ${SBINDIR}
4968d0f7 44 install -m 0755 pve-update-lxc-config ${SBINDIR}
bf9f492f
DM
45 install -d ${LXC_SCRIPT_DIR}
46 install -m 0755 lxcnetaddbr ${LXC_SCRIPT_DIR}
47 install -d ${LXC_HOOK_DIR}
48 install -m 0755 lxc-pve-mount-hook ${LXC_HOOK_DIR}
32e6d659 49 install -m 0755 lxc-pve-poststop-hook ${LXC_HOOK_DIR}
bf9f492f
DM
50 install -d ${LXC_COMMON_CONFIG_DIR}
51 install -m 0644 lxc-pve.conf ${LXC_COMMON_CONFIG_DIR}/01-pve.conf
f76a2828
DM
52 make -C PVE install
53 install -d ${MAN1DIR}
81bee809 54 install -d ${MAN5DIR}
f76a2828
DM
55 install -d ${PODDIR}
56 install -m 0644 pct.1.gz ${MAN1DIR}
f76a2828 57 install -m 0644 pct.1.pod ${PODDIR}
81bee809
DM
58 install -m 0644 pct.conf.5.pod ${PODDIR}
59 install -m 0644 pct.conf.5.gz ${MAN5DIR}
f76a2828 60
1e180f97
DM
61.PHONY: test
62test:
63 make -C test test
64
f76a2828
DM
65.PHONY: clean
66clean:
1e180f97 67 make -C test clean
f76a2828
DM
68 rm -rf *.1.pod *.1.gz
69 find . -name '*~' -exec rm {} ';'
70
71.PHONY: distclean
72distclean: clean
73