Skip to content

Commit 5a59fbb

Browse files
committed
Makefile: introduce NUT_DDL_PYTHON make var
Optionally allow the caller to customize the python interpreter to use for nut-ddl.py Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent 6674dd6 commit 5a59fbb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ all: check
44
# (e.g. with GitHub Actions self-test)
55
NUT_WEBSITE_DIR=..
66

7+
# Optionally allow the caller to customize the python interpreter to
8+
# use for nut-ddl.py:
9+
NUT_DDL_PYTHON=
10+
711
# NOTE: The checks below are rudimentary, just to filter away the most
812
# blatant issues. More diligent ones are in nut-website:nut-ddl.py parser.
913
check: check-filename-structure check-content-markup
@@ -36,13 +40,13 @@ check-content-markup:
3640
find . -type f -name '*.dev' | ( \
3741
echo "`date -u`: Sanity-checking the *.dev files..."; \
3842
if [ -x $(NUT_WEBSITE_DIR)/tools/nut-ddl.py ] ; then \
39-
echo "`date -u`: will use $(NUT_WEBSITE_DIR)/tools/nut-ddl.py for deeper checks" ; \
43+
echo "`date -u`: will use $(NUT_DDL_PYTHON) $(NUT_WEBSITE_DIR)/tools/nut-ddl.py for deeper checks" ; \
4044
fi ; \
4145
FAILED=""; \
4246
PASSED=""; \
4347
while read F ; do \
4448
if [ -x $(NUT_WEBSITE_DIR)/tools/nut-ddl.py ] ; then \
45-
RES=0 ; $(NUT_WEBSITE_DIR)/tools/nut-ddl.py "$$F" "$$F.tmp.html" || RES=$$? ; \
49+
RES=0 ; $(NUT_DDL_PYTHON) $(NUT_WEBSITE_DIR)/tools/nut-ddl.py "$$F" "$$F.tmp.html" || RES=$$? ; \
4650
rm -f "$$F.tmp.html" ; \
4751
if [ "$$RES" != 0 ] ; then \
4852
echo "^^^ $$F" && FAILED="$$FAILED $$F" && continue; \

0 commit comments

Comments
 (0)