Browse Source

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>
main
David Gibson 5 years ago
parent
commit
6c253afd07
  1. 8
      Makefile

8
Makefile

@ -45,6 +45,8 @@ INCLUDEDIR = $(PREFIX)/include @@ -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 = \ @@ -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 @@ -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 @@ -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


Loading…
Cancel
Save