pylibfdt: Allow pkg-config to be supplied in the environment

Some build systems have their own version of the pkg-config tool.
Use a variable for this instead of hard-coding it, to allow for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
Simon Glass 2017-03-26 13:06:17 -06:00 committed by David Gibson
parent 6afd7d9688
commit 4e0e0d0497
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
BISON = bison
LEX = flex
SWIG = swig
PKG_CONFIG ?= pkg-config

INSTALL = /usr/bin/install
DESTDIR =
@ -119,7 +120,7 @@ SCRIPTS = dtdiff
# We need both Python and swig to build pylibfdt.
.PHONY: maybe_pylibfdt
maybe_pylibfdt: FORCE
if pkg-config --cflags python >/dev/null 2>&1; then \
if $(PKG_CONFIG) --cflags python >/dev/null 2>&1; then \
if which swig >/dev/null 2>&1; then \
can_build=yes; \
fi; \