]>
Commit | Line | Data |
---|---|---|
beb651ee DM |
1 | include ../defines.mk |
2 | ||
567a0d89 DM |
3 | # this requires package pve-doc-generator |
4 | export NOVIEW=1 | |
5 | include /usr/share/pve-doc-generator/pve-doc-generator.mk | |
6 | ||
be613dfc DM |
7 | export PERLLIB=.. |
8 | ||
8891d66f | 9 | SUBDIRS = init.d ocf test |
beb651ee | 10 | |
c2b121c0 | 11 | SERVICES = pvestatd pveproxy pvedaemon spiceproxy |
892821fd | 12 | CLITOOLS = vzdump pvesubscription pveceph pveam pvesr |
0d640361 | 13 | |
beb651ee | 14 | SCRIPTS = \ |
0d640361 | 15 | ${SERVICES} \ |
45e37400 | 16 | ${CLITOOLS} \ |
beb651ee | 17 | pvesh \ |
beb651ee | 18 | pvebanner \ |
beb651ee | 19 | pveversion \ |
46c17bd2 | 20 | pvemailforward.pl \ |
b179a622 | 21 | pveupgrade \ |
c9355915 | 22 | pveupdate \ |
e03a7900 EK |
23 | pveperf \ |
24 | pvereport | |
beb651ee | 25 | |
0d640361 DM |
26 | SERVICE_MANS = $(addsuffix .8, ${SERVICES}) |
27 | ||
28 | CLI_MANS = \ | |
45e37400 | 29 | $(addsuffix .1, ${CLITOOLS}) \ |
0d640361 | 30 | pveversion.1 \ |
0d640361 | 31 | pveupgrade.1 \ |
108b7229 | 32 | pveperf.1 \ |
e03a7900 | 33 | pvesh.1 \ |
108b7229 | 34 | pvereport.1 \ |
f6b62dd2 | 35 | |
beb651ee | 36 | |
0d640361 DM |
37 | all: ${SERVICE_MANS} ${CLI_MANS} pvemailforward |
38 | ||
339e4159 DM |
39 | %.1: %.1.pod |
40 | rm -f $@ | |
0d640361 DM |
41 | cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation" >$@.tmp |
42 | mv $@.tmp $@ | |
339e4159 | 43 | |
0d640361 DM |
44 | pveversion.1.pod: pveversion |
45 | podselect $< > $@.tmp | |
46 | mv $@.tmp $@ | |
339e4159 | 47 | |
0d640361 DM |
48 | pveupgrade.1.pod: pveupgrade |
49 | podselect $< > $@.tmp | |
50 | mv $@.tmp $@ | |
891d1242 | 51 | |
f6b62dd2 EK |
52 | pvesh.1.pod: pvesh |
53 | podselect $< > $@.tmp | |
54 | mv $@.tmp $@ | |
55 | ||
e03a7900 EK |
56 | pvereport.1.pod: pvereport |
57 | podselect $< > $@.tmp | |
58 | mv $@.tmp $@ | |
59 | ||
0d640361 DM |
60 | %.service-bash-completion: |
61 | perl -I.. -T -e "use PVE::Service::$*; PVE::Service::$*->generate_bash_completions();" >$@.tmp | |
62 | mv $@.tmp $@ | |
4a17e72e | 63 | |
45e37400 DM |
64 | %.bash-completion: |
65 | perl -I.. -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp | |
66 | mv $@.tmp $@ | |
67 | ||
46c17bd2 | 68 | pvemailforward: pvemailforward.c |
103ddb88 | 69 | $(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@ |
46c17bd2 | 70 | |
0d640361 | 71 | .PHONY: install |
567a0d89 | 72 | install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward $(addsuffix .service-bash-completion, ${SERVICES}) $(addsuffix .bash-completion, ${CLITOOLS}) |
beb651ee | 73 | perl -I.. ./pvesh verifyapi |
45e37400 | 74 | for i in ${CLITOOLS}; do perl -I.. -T -e "use PVE::CLI::$$i; PVE::CLI::$$i->verify_api();"; done |
0d640361 | 75 | for i in ${SERVICES}; do perl -I.. -T -e "use PVE::Service::$$i; PVE::Service::$$i->verify_api();"; done |
beb651ee DM |
76 | install -d ${BINDIR} |
77 | install -m 0755 ${SCRIPTS} ${BINDIR} | |
46c17bd2 | 78 | install -s -m 2755 -g www-data pvemailforward ${BINDIR} |
beb651ee | 79 | install -d ${MAN1DIR} |
0d640361 DM |
80 | install -m 0644 ${CLI_MANS} ${MAN1DIR} |
81 | install -d ${MAN8DIR} | |
82 | install -m 0644 ${SERVICE_MANS} ${MAN8DIR} | |
45e37400 | 83 | for i in ${CLITOOLS}; do install -m 0644 -D $$i.bash-completion ${BASHCOMPLDIR}/$$i; done |
0d640361 | 84 | for i in ${SERVICES}; do install -m 0644 -D $$i.service-bash-completion ${BASHCOMPLDIR}/$$i; done |
beb651ee DM |
85 | set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done |
86 | ||
beb651ee DM |
87 | .PHONY: clean |
88 | clean: | |
567a0d89 | 89 | make cleanup-docgen |
0d640361 | 90 | rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward *.bash-completion *.service-bash-completion |
beb651ee | 91 | set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done |