]> git.proxmox.com Git - pve-manager.git/blob - bin/Makefile
buildsys: rework doc-gen cleanup and makefile inclusion
[pve-manager.git] / bin / Makefile
1 include ../defines.mk
2
3 PERL_DOC_INC_DIRS=..
4 -include /usr/share/pve-doc-generator/pve-doc-generator.mk
5
6 SERVICES = pvestatd pveproxy pvedaemon spiceproxy pvescheduler
7 CLITOOLS = vzdump pvesubscription pveceph pveam pvesr pvenode pvesh pve6to7
8
9 SCRIPTS = \
10 $(SERVICES) \
11 $(CLITOOLS) \
12 pvebanner \
13 pveversion \
14 pveupgrade \
15 pveupdate \
16 pveperf \
17 pvereport
18
19 SERVICE_MANS = $(addsuffix .8, $(SERVICES))
20
21 CLI_MANS = \
22 $(addsuffix .1, $(CLITOOLS)) \
23 pveversion.1 \
24 pveupgrade.1 \
25 pveperf.1 \
26 pvereport.1 \
27
28 BASH_COMPLETIONS = \
29 $(addsuffix .service-bash-completion, $(SERVICES)) \
30 $(addsuffix .bash-completion, $(CLITOOLS)) \
31
32 ZSH_COMPLETIONS = \
33 $(addsuffix .service-zsh-completion, $(SERVICES)) \
34 $(addsuffix .zsh-completion, $(CLITOOLS)) \
35
36 all: $(SERVICE_MANS) $(CLI_MANS)
37
38 %.1: %.1.pod
39 rm -f $@
40 cat $<|pod2man -n $* -s 1 -r $(VERSION) -c"Proxmox Documentation" - >$@.tmp
41 mv $@.tmp $@
42
43 %.1.pod:
44 podselect $* > $@.tmp
45 mv $@.tmp $@
46
47 pve6to7.1:
48 printf ".TH PVE6TO7 1\n.SH NAME\npve6to7 \- Proxmox VE upgrade checker script for 6.4 to 7.x\n" > $@
49 printf ".SH SYNOPSIS\npve6to7 [--full]\n" >> $@
50
51 pveversion.1.pod: pveversion
52 pveupgrade.1.pod: pveupgrade
53 pvereport.1.pod: pvereport
54
55 .PHONY: check
56 check: $(addsuffix .service-api-verified, $(SERVICES)) $(addsuffix .api-verified, $(CLITOOLS))
57 rm -f *.service-api-verified *.api-verified
58
59 .PHONY: install
60 install: $(SCRIPTS) $(CLI_MANS) $(SERVICE_MANS) $(BASH_COMPLETIONS) $(ZSH_COMPLETIONS)
61 install -d $(BINDIR)
62 install -m 0755 $(SCRIPTS) $(BINDIR)
63 install -d $(USRSHARE)/helpers
64 install -m 0755 pve-startall-delay $(USRSHARE)/helpers
65 install -d $(MAN1DIR)
66 install -m 0644 $(CLI_MANS) $(MAN1DIR)
67 install -d $(MAN8DIR)
68 install -m 0644 $(SERVICE_MANS) $(MAN8DIR)
69 for i in $(CLITOOLS); do install -m 0644 -D $$i.bash-completion $(BASHCOMPLDIR)/$$i; done
70 for i in $(SERVICES); do install -m 0644 -D $$i.service-bash-completion $(BASHCOMPLDIR)/$$i; done
71 for i in $(CLITOOLS); do install -m 0644 -D $$i.zsh-completion $(ZSHCOMPLDIR)/_$$i; done
72 for i in $(SERVICES); do install -m 0644 -D $$i.service-zsh-completion $(ZSHCOMPLDIR)/_$$i; done
73
74 .PHONY: clean
75 clean:
76 rm -f *.xml.tmp *.1 *.5 *.8 *{synopsis,opts}.adoc docinfo.xml
77 rm -f *~ *.tmp $(CLI_MANS) $(SERVICE_MANS) *.1.pod *.8.pod
78 rm -f *.bash-completion *.service-bash-completion *.zsh-completion *.service-zsh-completion
79 rm -f *.api-verified *.service-api-verified