diff options
author | Chad Smith <chad.smith@canonical.com> | 2017-06-07 18:13:09 -0600 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2017-06-08 07:26:40 -0600 |
commit | 7dcc15d02d997e88c075976a55bf07e789cd18fd (patch) | |
tree | 35be80b694c6b9c6bb16b65e6945348418889a81 /Makefile | |
parent | ecad2211f98ba503c61e3502a04176f41849ff41 (diff) | |
download | vyos-cloud-init-7dcc15d02d997e88c075976a55bf07e789cd18fd.tar.gz vyos-cloud-init-7dcc15d02d997e88c075976a55bf07e789cd18fd.zip |
makefile: fix python 2/3 detection in the Makefile
Fix detection of python in a non-python3 environment.
The old path always used python3. The 2 fixes here are:
a.) escape the '$' before the subshell.
b.) use shell builtin 'command -v' rather than 'which' in case
'which' is not available.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,7 +1,7 @@ CWD=$(shell pwd) PYVER ?= $(shell for p in python3 python2; do \ - out=$(which $$p 2>&1) && echo $$p && exit; done; \ - exit 1) + out=$$(command -v $$p 2>&1) && echo $$p && exit; done; exit 1) + noseopts ?= -v YAML_FILES=$(shell find cloudinit bin tests tools -name "*.yaml" -type f ) |