make: more changes, mfc mostly works

We want to avoid WRKDIR use since it's not defined in the plugins
base directory case (and we don't want to create it which looks like
a category). Pivot to MFCDIR instead.
This commit is contained in:
Franco Fichtner 2025-07-30 09:49:45 +02:00
parent 102617e5b1
commit 6cbed6ff42
3 changed files with 11 additions and 14 deletions

View File

@ -26,11 +26,11 @@
# pin the core reference directory from the parse directory of this file
COREREFDIR:= ${.PARSEDIR}/..
WRKDIR?=${.CURDIR}/work
MFCDIR?=${WRKDIR}/mfc
PKGDIR?=${WRKDIR}/pkg
WRKSRC?=${WRKDIR}/src
TESTDIR?=${.CURDIR}/src/opnsense/mvc/tests
WRKDIR?= ${.CURDIR}/work
MFCDIR?= /tmp/mfc.dir
PKGDIR?= ${WRKDIR}/pkg
WRKSRC?= ${WRKDIR}/src
TESTDIR?= ${.CURDIR}/src/opnsense/mvc/tests
clean-pkgdir:
@rm -rf ${PKGDIR}

View File

@ -62,7 +62,6 @@ diff: ensure-stable
feed: ensure-stable
@git log --stat -p --reverse ${CORE_STABLE}...${feed_ARGS:[1]}~1 ${.CURDIR}
.if !target(mfc)
mfc: ensure-stable clean-mfcdir
.for MFC in ${mfc_ARGS}
.if exists(${MFC})
@ -83,7 +82,6 @@ mfc: ensure-stable clean-mfcdir
.endif
@git checkout ${CORE_MAIN}
.endfor
.endif
stable:
@git checkout ${CORE_STABLE}

View File

@ -28,18 +28,17 @@ STYLEDIRS= ${.CURDIR}/src/etc/inc ${.CURDIR}/src/opnsense
style-python:
@pycodestyle-${CORE_PYTHON_DOT} --ignore=E501 ${.CURDIR}/src || true
style-php:
@: > ${WRKDIR}/style.out
style-php: clean-mfcdir
.for DIR in ${STYLEDIRS}
.if exists(${DIR})
@(phpcs --standard=${COREREFDIR}/ruleset.xml ${DIR} || true) >> ${WRKDIR}/style.out
@(phpcs --standard=${COREREFDIR}/ruleset.xml ${DIR} || true) >> ${MFCDIR}/.style.out
.endif
.endfor
@echo -n "Total number of style warnings: "
@grep '| WARNING' ${WRKDIR}/style.out | wc -l
@grep '| WARNING' ${MFCDIR}/.style.out | wc -l
@echo -n "Total number of style errors: "
@grep '| ERROR' ${WRKDIR}/style.out | wc -l
@cat ${WRKDIR}/style.out | ${PAGER}
@rm ${WRKDIR}/style.out
@grep '| ERROR' ${MFCDIR}/.style.out | wc -l
@cat ${MFCDIR}/.style.out | ${PAGER}
@rm ${MFCDIR}/.style.out
style: style-python style-php