pve-manager/bin/Makefile
Thomas Lamprecht 09df2aac59 pve5to6 will never be a POD based man page, fake it for now
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-25 09:51:00 +02:00

86 lines
2.4 KiB
Makefile

include ../defines.mk
# this requires package pve-doc-generator
export NOVIEW=1
PERL_DOC_INC_DIRS=..
include /usr/share/pve-doc-generator/pve-doc-generator.mk
SERVICES = pvestatd pveproxy pvedaemon spiceproxy
CLITOOLS = vzdump pvesubscription pveceph pveam pvesr pvenode pvesh pve5to6
SCRIPTS = \
${SERVICES} \
${CLITOOLS} \
pvebanner \
pveversion \
pvemailforward.pl \
pveupgrade \
pveupdate \
pveperf \
pvereport
SERVICE_MANS = $(addsuffix .8, ${SERVICES})
CLI_MANS = \
$(addsuffix .1, ${CLITOOLS}) \
pveversion.1 \
pveupgrade.1 \
pveperf.1 \
pvereport.1 \
BASH_COMPLETIONS = \
$(addsuffix .service-bash-completion, ${SERVICES}) \
$(addsuffix .bash-completion, ${CLITOOLS}) \
ZSH_COMPLETIONS = \
$(addsuffix .service-zsh-completion, ${SERVICES}) \
$(addsuffix .zsh-completion, ${CLITOOLS}) \
all: ${SERVICE_MANS} ${CLI_MANS} pvemailforward
%.1: %.1.pod
rm -f $@
cat $<|pod2man -n $* -s 1 -r ${VERSION} -c"Proxmox Documentation" - >$@.tmp
mv $@.tmp $@
%.1.pod:
podselect $* > $@.tmp
mv $@.tmp $@
pve5to6.1:
echo ".TH pve5to6 1" > $@
pveversion.1.pod: pveversion
pveupgrade.1.pod: pveupgrade
pvereport.1.pod: pvereport
pvemailforward: pvemailforward.c
$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@
.PHONY: check
check: $(addsuffix .service-api-verified, ${SERVICES}) $(addsuffix .api-verified, ${CLITOOLS})
rm -f *.service-api-verified *.api-verified
.PHONY: install
install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
install -d ${BINDIR}
install -m 0755 ${SCRIPTS} ${BINDIR}
install -s -m 2755 -g www-data pvemailforward ${BINDIR}
install -d ${MAN1DIR}
install -m 0644 ${CLI_MANS} ${MAN1DIR}
install -d ${MAN8DIR}
install -m 0644 ${SERVICE_MANS} ${MAN8DIR}
for i in ${CLITOOLS}; do install -m 0644 -D $$i.bash-completion ${BASHCOMPLDIR}/$$i; done
for i in ${SERVICES}; do install -m 0644 -D $$i.service-bash-completion ${BASHCOMPLDIR}/$$i; done
for i in ${CLITOOLS}; do install -m 0644 -D $$i.zsh-completion ${ZSHCOMPLDIR}/_$$i; done
for i in ${SERVICES}; do install -m 0644 -D $$i.service-zsh-completion ${ZSHCOMPLDIR}/_$$i; done
.PHONY: clean
clean:
make cleanup-docgen
rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward \
*.bash-completion *.service-bash-completion \
*.zsh-completion *.service-zsh-completion \
*.api-verified *.service-api-verified