summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2020-03-04 15:44:00 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-03-04 15:44:00 +1100
commit6c253afd07d4722aaa7f72d33ca7cbeba973ccfb (patch)
tree028af27efd4633d7e146e8537de9191453c6db04
parent95ec8ef706bd776f3154f6a4dfa11b07433a2a80 (diff)
downloaddevice-tree-compiler-6c253afd07d4722aaa7f72d33ca7cbeba973ccfb.tar.gz
Encode $(NO_PYTHON) consistently with other variables
We have several $(NO_*) variables used to disable optional features. $(NO_PYTHON) is encoded as empty for "include Python support" and anything else for "disable Python support". However the other variables - $(NO_YAML) and $(NO_VALGRIND) - use 0 for "include" and 1 for "disable". Change $(NO_PYTHON) to work consistently with the others. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0dff03f..5f4aa91 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,8 @@ INCLUDEDIR = $(PREFIX)/include
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
sed -e 's/\(cygwin\|msys\).*/\1/')
+NO_PYTHON ?= 0
+
NO_VALGRIND := $(shell $(PKG_CONFIG) --exists valgrind; echo $$?)
ifeq ($(NO_VALGRIND),1)
CPPFLAGS += -DNO_VALGRIND
@@ -168,7 +170,7 @@ check_python_deps = \
maybe_pylibfdt: FORCE
target=pylibfdt; $(check_python_deps)
-ifeq ($(NO_PYTHON),)
+ifeq ($(NO_PYTHON),0)
all: maybe_pylibfdt
endif
@@ -240,7 +242,7 @@ install: install-bin install-lib install-includes
maybe_install_pylibfdt: FORCE
target=install_pylibfdt; $(check_python_deps)
-ifeq ($(NO_PYTHON),)
+ifeq ($(NO_PYTHON),0)
install: maybe_install_pylibfdt
endif
@@ -312,7 +314,7 @@ TESTS_BIN += fdtput
TESTS_BIN += fdtget
TESTS_BIN += fdtdump
TESTS_BIN += fdtoverlay
-ifeq ($(NO_PYTHON),)
+ifeq ($(NO_PYTHON),0)
TESTS_PYLIBFDT += maybe_pylibfdt
endif