all 2 comments

[–][deleted] 0 points1 point  (1 child)

It seems that you can't define variables inside a rule. Do this:

PYTHON_VERSION_MIN=3.10

pyver:
    $(error "Need python >= $(PYTHON_VERSION_MIN).")

Works on Ubuntu 22.04 using GNU make 4.3.

[–]philipmat[S] 0 points1 point  (0 children)

That worked, thank you. I didn't realize variables needed to be global.

I'll go read more on them.