From 7f4d4526f20e084f690065f6c2131ca7f80d5efc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 17 Oct 2018 13:02:05 +0200 Subject: [PATCH] build: use pve-doc-generator to verify API MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit and move API verification to 'check' target, where it belongs. Signed-off-by: Fabian Grünbichler --- Makefile | 4 +++- bin/Makefile | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8d462915..8eb5928f 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,9 @@ DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb all: ${SUBDIRS} set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done -check: +.PHONY: check +check: bin tests + ${MAKE} -C bin check ${MAKE} -C test check .PHONY: dinstall diff --git a/bin/Makefile b/bin/Makefile index 761e7f53..d6287833 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -52,11 +52,12 @@ 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} - perl -I.. ./pvesh verifyapi - for i in ${CLITOOLS}; do perl -I.. -T -e "use PVE::CLI::$$i; PVE::CLI::$$i->verify_api();"; done - for i in ${SERVICES}; do perl -I.. -T -e "use PVE::Service::$$i; PVE::Service::$$i->verify_api();"; done install -d ${BINDIR} install -m 0755 ${SCRIPTS} ${BINDIR} install -s -m 2755 -g www-data pvemailforward ${BINDIR} @@ -70,4 +71,4 @@ install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETION .PHONY: clean clean: make cleanup-docgen - rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward *.bash-completion *.service-bash-completion + rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward *.bash-completion *.service-bash-completion *.api-verified *.service-api-verified -- 2.39.2