From 6c253afd07d4722aaa7f72d33ca7cbeba973ccfb Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 4 Mar 2020 15:44:00 +1100 Subject: 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 --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Makefile') 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 -- cgit v1.1