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
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
sed -e 's/\(cygwin\|msys\).*/\1/') sed -e 's/\(cygwin\|msys\).*/\1/')


NO_PYTHON ?= 0

NO_VALGRIND := $(shell $(PKG_CONFIG) --exists valgrind; echo $$?) NO_VALGRIND := $(shell $(PKG_CONFIG) --exists valgrind; echo $$?)
ifeq ($(NO_VALGRIND),1) ifeq ($(NO_VALGRIND),1)
CPPFLAGS += -DNO_VALGRIND CPPFLAGS += -DNO_VALGRIND
@ -168,7 +170,7 @@ check_python_deps = \
maybe_pylibfdt: FORCE maybe_pylibfdt: FORCE
target=pylibfdt; $(check_python_deps) target=pylibfdt; $(check_python_deps)


ifeq ($(NO_PYTHON),) ifeq ($(NO_PYTHON),0)
all: maybe_pylibfdt all: maybe_pylibfdt
endif endif


@ -240,7 +242,7 @@ install: install-bin install-lib install-includes
maybe_install_pylibfdt: FORCE maybe_install_pylibfdt: FORCE
target=install_pylibfdt; $(check_python_deps) target=install_pylibfdt; $(check_python_deps)


ifeq ($(NO_PYTHON),) ifeq ($(NO_PYTHON),0)
install: maybe_install_pylibfdt install: maybe_install_pylibfdt
endif endif


@ -312,7 +314,7 @@ TESTS_BIN += fdtput
TESTS_BIN += fdtget TESTS_BIN += fdtget
TESTS_BIN += fdtdump TESTS_BIN += fdtdump
TESTS_BIN += fdtoverlay TESTS_BIN += fdtoverlay
ifeq ($(NO_PYTHON),) ifeq ($(NO_PYTHON),0)
TESTS_PYLIBFDT += maybe_pylibfdt TESTS_PYLIBFDT += maybe_pylibfdt
endif endif



Loading…
Cancel
Save