pve-manager/PVE/Makefile
Thomas Lamprecht 0e77456f1f expand repoid to 16 chars and avoid querying git for it twice
i.e., just reuse GITVERSION, and FWIW, the current ID length git
auto chooses is 9 chars, suggesting that 8 really was getting to
small. With 16 we got now 64 bits, that's plenty for the next few
years.

Document the format also (roughly) in the API schema

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-29 18:24:00 +02:00

41 lines
1009 B
Makefile

include ../defines.mk
SUBDIRS=API2 Status CLI Service Ceph Jobs
PERLSOURCE = \
API2.pm \
API2Tools.pm \
APLInfo.pm \
AutoBalloon.pm \
CertCache.pm \
CertHelpers.pm \
ExtMetric.pm \
HTTPServer.pm \
Jobs.pm \
NodeConfig.pm \
Report.pm \
VZDump.pm
all: pvecfg.pm $(SUBDIRS)
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done
REPOID ?= $(or $(GITVERSION), $(shell git rev-parse --short=16 HEAD), unknown)
pvecfg.pm: pvecfg.pm.in
sed 's/@VERSION@/$(VERSION)/;s/@PVERELEASE@/$(PVERELEASE)/;s/@PACKAGE@/$(PACKAGE)/;s/@REPOID@/$(REPOID)/' $< >$@.tmp
mv $@.tmp $@
%:
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
.PHONY: clean
clean:
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
rm -rf *~ pvecfg.pm pvecfg.pm.tmp
.PHONY: install
install: pvecfg.pm $(PERLSOURCE)
install -d $(PERLLIBDIR)/PVE
install -m 0644 pvecfg.pm $(PERLLIBDIR)/PVE/
install -m 0644 $(PERLSOURCE) $(PERLLIBDIR)/PVE/
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done