Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- python_version_full := $(wordlist 2,4,$(subst ., ,$(shell python --version 2>&1)))
- python_version_major := $(word 1,${python_version_full})
- my_cmd := ${my_cmd.python.${python_version_major}}
- py = python3
- ifeq ($(python_version_major),2)
- py = python2
- endif
- all :
- @echo ${py}
Add Comment
Please, Sign In to add comment