mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
Create and commit the files generated by the dynamic gettext extraction, so that we can review changes more gracefully. Two files in the Traffic Shaper forms don't parse right now, but I have no clue why.
74 lines
2.2 KiB
Makefile
74 lines
2.2 KiB
Makefile
PAGER?= less
|
|
|
|
all:
|
|
@cat ${.CURDIR}/README.md | ${PAGER}
|
|
|
|
force:
|
|
|
|
mount: force
|
|
@${.CURDIR}/scripts/version.sh > \
|
|
${.CURDIR}/src/opnsense/version/opnsense
|
|
/sbin/mount_unionfs ${.CURDIR}/src /usr/local
|
|
|
|
umount: force
|
|
/sbin/umount -f "<above>:${.CURDIR}/src"
|
|
|
|
install: force
|
|
# move all sources to their destination
|
|
@mkdir -p ${DESTDIR}/usr/local
|
|
@cp -r ${.CURDIR}/src/* ${DESTDIR}/usr/local
|
|
# disable warnings for production systems
|
|
@sed -i '' -e 's/E_STRICT/E_STRICT | E_WARNING/g' \
|
|
${DESTDIR}/usr/local/etc/rc.php_ini_setup
|
|
# invoke pkg(8) bootstraping
|
|
@make -C ${.CURDIR}/pkg install
|
|
# invoke translation glue
|
|
@make -C ${.CURDIR}/lang install
|
|
# finally pretty-print a list of files present
|
|
@(cd ${.CURDIR}/src; find * -type f) | \
|
|
xargs -n1 printf "/usr/local/%s\n"
|
|
|
|
lint: force
|
|
find ${.CURDIR}/src ${.CURDIR}/lang/dynamic/helpers \
|
|
! -name "*.xml" ! -name "*.eot" \
|
|
! -name "*.svg" ! -name "*.woff" ! -name "*.woff2" \
|
|
! -name "*.otf" ! -name "*.png" ! -name "*.js" \
|
|
! -name "*.scss" ! -name "*.py" ! -name "*.ttf" \
|
|
! -name "*.tgz" -type f -print0 | xargs -0 -n1 php -l
|
|
|
|
sweep: force
|
|
find ${.CURDIR}/src ! -name "*.min.*" ! -name "*.svg" \
|
|
! -name "*.map" -type f -print0 | \
|
|
xargs -0 -n1 scripts/cleanfile
|
|
find ${.CURDIR}/pkg -type f -print0 | \
|
|
xargs -0 -n1 scripts/cleanfile
|
|
find ${.CURDIR}/lang -type f -print0 | \
|
|
xargs -0 -n1 scripts/cleanfile
|
|
find ${.CURDIR}/scripts -type f -print0 | \
|
|
xargs -0 -n1 scripts/cleanfile
|
|
|
|
style: force
|
|
@(phpcs --tab-width=4 --standard=PSR2 ${.CURDIR}/src/opnsense/mvc \
|
|
|| true) > ${.CURDIR}/.style.out
|
|
@echo -n "Total number of style warnings: "
|
|
@grep '| WARNING' ${.CURDIR}/.style.out | wc -l
|
|
@echo -n "Total number of style errors: "
|
|
@grep '| ERROR' ${.CURDIR}/.style.out | wc -l
|
|
@cat ${.CURDIR}/.style.out
|
|
@rm ${.CURDIR}/.style.out
|
|
|
|
stylefix: force
|
|
phpcbf --standard=PSR2 ${.CURDIR}/src/opnsense/mvc || true
|
|
|
|
setup: force
|
|
${.CURDIR}/src/etc/rc.php_ini_setup
|
|
|
|
health: force
|
|
# check test script output and advertise a failure...
|
|
[ "`${.CURDIR}/src/etc/rc.php_test_run`" == "FCGI-PASSED PASSED" ]
|
|
|
|
clean:
|
|
git reset --hard HEAD && git clean -xdqf .
|
|
|
|
.PHONY: force
|