]> git.proxmox.com Git - pve-manager.git/blame - bin/Makefile
fix initlog name
[pve-manager.git] / bin / Makefile
CommitLineData
beb651ee
DM
1include ../defines.mk
2
8891d66f 3SUBDIRS = init.d ocf test
beb651ee 4
c2b121c0 5SERVICES = pvestatd pveproxy pvedaemon spiceproxy
3e8560ac 6CLITOOLS = vzdump pvesubscription pveceph
0d640361 7
beb651ee 8SCRIPTS = \
0d640361 9 ${SERVICES} \
45e37400 10 ${CLITOOLS} \
beb651ee
DM
11 pvesh \
12 pveam \
13 pvebanner \
beb651ee 14 pveversion \
46c17bd2 15 pvemailforward.pl \
b179a622 16 pveupgrade \
c9355915 17 pveupdate \
e03a7900
EK
18 pveperf \
19 pvereport
beb651ee 20
0d640361 21SERVICE_MANS = $(addsuffix .8, ${SERVICES})
56eb95dd 22SERVICE_PODS = $(addsuffix .pod, ${SERVICE_MANS})
0d640361
DM
23
24CLI_MANS = \
45e37400 25 $(addsuffix .1, ${CLITOOLS}) \
0d640361 26 pveversion.1 \
0d640361 27 pveupgrade.1 \
f6b62dd2 28 pveperf.1 \
e03a7900
EK
29 pvesh.1 \
30 pvereport.1
f6b62dd2 31
56eb95dd
TL
32CLI_PODS = $(addsuffix .pod, ${CLI_MANS})
33
beb651ee 34
0d640361
DM
35all: ${SERVICE_MANS} ${CLI_MANS} pvemailforward
36
37%.1.pod: %
38 perl -I.. -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_pod_manpage();" >$@.tmp
39 mv $@.tmp $@
40
41%.8.pod: %
42 perl -I.. -T -e "use PVE::Service::$*; PVE::Service::$*->generate_pod_manpage();" >$@.tmp
43 mv $@.tmp $@
c36eee43 44
339e4159
DM
45%.1: %.1.pod
46 rm -f $@
0d640361
DM
47 cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation" >$@.tmp
48 mv $@.tmp $@
339e4159 49
0d640361
DM
50%.8: %.8.pod
51 rm -f $@
52 cat $<|pod2man -n $* -s 8 -r ${VERSION} -c "Proxmox Documentation" >$@.tmp
53 mv $@.tmp $@
54
55pveversion.1.pod: pveversion
56 podselect $< > $@.tmp
57 mv $@.tmp $@
339e4159 58
0d640361
DM
59pveupgrade.1.pod: pveupgrade
60 podselect $< > $@.tmp
61 mv $@.tmp $@
891d1242 62
0d640361
DM
63pveperf.1.pod: pveperf
64 podselect $< > $@.tmp
65 mv $@.tmp $@
6669b51c 66
f6b62dd2
EK
67pvesh.1.pod: pvesh
68 podselect $< > $@.tmp
69 mv $@.tmp $@
70
e03a7900
EK
71pvereport.1.pod: pvereport
72 podselect $< > $@.tmp
73 mv $@.tmp $@
74
0d640361
DM
75%.service-bash-completion:
76 perl -I.. -T -e "use PVE::Service::$*; PVE::Service::$*->generate_bash_completions();" >$@.tmp
77 mv $@.tmp $@
4a17e72e 78
45e37400
DM
79%.bash-completion:
80 perl -I.. -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
81 mv $@.tmp $@
82
339e4159
DM
83pvectl.1.pod: pvectl
84 perl -I.. ./pvectl printmanpod >$@
39ab3ea6 85
aabf3add
DM
86vzrestore.1.pod: vzrestore
87 perl -I.. ./vzrestore printmanpod >$@
88
46c17bd2
DM
89pvemailforward: pvemailforward.c
90 gcc $< -o $@ -g -O2 -Wall -ldl -lc
91
0d640361 92.PHONY: install
56eb95dd 93install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward $(addsuffix .service-bash-completion, ${SERVICES}) $(addsuffix .bash-completion, ${CLITOOLS}) ${SERVICE_PODS} ${CLI_PODS}
beb651ee 94 perl -I.. ./pvesh verifyapi
45e37400 95 for i in ${CLITOOLS}; do perl -I.. -T -e "use PVE::CLI::$$i; PVE::CLI::$$i->verify_api();"; done
0d640361 96 for i in ${SERVICES}; do perl -I.. -T -e "use PVE::Service::$$i; PVE::Service::$$i->verify_api();"; done
beb651ee
DM
97 install -d ${BINDIR}
98 install -m 0755 ${SCRIPTS} ${BINDIR}
46c17bd2 99 install -s -m 2755 -g www-data pvemailforward ${BINDIR}
beb651ee 100 install -d ${MAN1DIR}
0d640361
DM
101 install -m 0644 ${CLI_MANS} ${MAN1DIR}
102 install -d ${MAN8DIR}
103 install -m 0644 ${SERVICE_MANS} ${MAN8DIR}
8ca33b63 104 install -d ${PODDIR}
45e37400 105 for i in ${CLITOOLS}; do install -m 0644 $$i.1.pod ${PODDIR}; done
45e37400 106 for i in ${CLITOOLS}; do install -m 0644 -D $$i.bash-completion ${BASHCOMPLDIR}/$$i; done
0d640361 107 for i in ${SERVICES}; do install -m 0644 -D $$i.service-bash-completion ${BASHCOMPLDIR}/$$i; done
beb651ee
DM
108 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
109
110.PHONY: distclean
111distclean: clean
112 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
113
114.PHONY: clean
115clean:
0d640361 116 rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward *.bash-completion *.service-bash-completion
beb651ee 117 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done