@@ -243,15 +243,16 @@ int main(int argc, char **argv)
243243 << " MATCHCOMPILER:=yes\n "
244244 << " endif\n " ;
245245 // TODO: bail out when matchcompiler.py fails (i.e. invalid PYTHON_INTERPRETER specified)
246+ // TODO: handle "PYTHON_INTERPRETER="
246247 fout << " ifeq ($(MATCHCOMPILER),yes)\n "
247248 << " # Find available Python interpreter\n "
248- << " ifndef PYTHON_INTERPRETER\n "
249+ << " ifeq ($( PYTHON_INTERPRETER),) \n "
249250 << " PYTHON_INTERPRETER := $(shell which python3)\n "
250251 << " endif\n "
251- << " ifndef PYTHON_INTERPRETER\n "
252+ << " ifeq ($( PYTHON_INTERPRETER),) \n "
252253 << " PYTHON_INTERPRETER := $(shell which python)\n "
253254 << " endif\n "
254- << " ifndef PYTHON_INTERPRETER\n "
255+ << " ifeq ($( PYTHON_INTERPRETER),) \n "
255256 << " $(error Did not find a Python interpreter)\n "
256257 << " endif\n "
257258 << " ifdef VERIFY\n "
@@ -495,6 +496,7 @@ int main(int argc, char **argv)
495496 fout << " \t xmllint --noout --relaxng cppcheck-errors.rng /tmp/errorlist.xml\n " ;
496497 fout << " \t xmllint --noout --relaxng cppcheck-errors.rng /tmp/example.xml\n " ;
497498 fout << " \n checkCWEEntries: /tmp/errorlist.xml\n " ;
499+ // TODO: handle "PYTHON_INTERPRETER="
498500 fout << " \t $(eval PYTHON_INTERPRETER := $(if $(PYTHON_INTERPRETER),$(PYTHON_INTERPRETER),$(shell which python3)))\n " ;
499501 fout << " \t $(eval PYTHON_INTERPRETER := $(if $(PYTHON_INTERPRETER),$(PYTHON_INTERPRETER),$(shell which python)))\n " ;
500502 fout << " \t $(eval PYTHON_INTERPRETER := $(if $(PYTHON_INTERPRETER),$(PYTHON_INTERPRETER),$(error Did not find a Python interpreter)))\n " ;
0 commit comments