diff --git a/Makefile b/Makefile index 8817a2c57..3e6f48cf3 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ list-full: @echo ${PLUGIN_DIR} -- $$(${MAKE} -C ${PLUGIN_DIR} -V PLUGIN_COMMENT) .endfor -TARGETS= lint sweep sytle style-fix clean +TARGETS= lint sweep style style-fix clean .for TARGET in ${TARGETS} ${TARGET}: diff --git a/Mk/plugins.mk b/Mk/plugins.mk index a37c2cb2e..becb616a8 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -214,8 +214,11 @@ sweep: check xargs -0 -n1 ${.CURDIR}/../../Scripts/cleanfile style: check - @(phpcs --standard=${.CURDIR}/../../ruleset.xml ${.CURDIR}/src \ - || true) > ${.CURDIR}/.style.out + @: > ${.CURDIR}/.style.out + @if [ -d ${.CURDIR}/src ]; then \ + (phpcs --standard=${.CURDIR}/../../ruleset.xml \ + ${.CURDIR}/src || true) > ${.CURDIR}/.style.out; \ + fi @echo -n "Total number of style warnings: " @grep '| WARNING' ${.CURDIR}/.style.out | wc -l @echo -n "Total number of style errors: " @@ -224,6 +227,9 @@ style: check @rm ${.CURDIR}/.style.out style-fix: check - phpcbf --standard=${.CURDIR}/../../ruleset.xml ${.CURDIR}/src || true + @if [ -d ${.CURDIR}/src ]; then \ + phpcbf --standard=${.CURDIR}/../../ruleset.xml \ + ${.CURDIR}/src || true; \ + fi .PHONY: check