mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org, rui.zhang@intel.com,
	jacob.jun.pan@linux.intel.com
Cc: gregory.0xf0@gmail.com, Florian Fainelli <f.fainelli@gmail.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Anand Moon <linux.amoon@gmail.com>
Subject: [PATCH] tools/thermal: tmon: Allow overriding pkg-config
Date: Fri,  7 Aug 2015 15:58:02 -0700	[thread overview]
Message-ID: <1438988284-8453-1-git-send-email-f.fainelli@gmail.com> (raw)

Some build systems might not ship with a proper pkg-config
infrastructure, so picking up the host pkg-config might cause us to link
with ncursesw which may not be present in the build environment.

Allow an external build system to override the pkg-config value (e.g:
set it to /bin/false if we do not have anything).

Fixes: 96a0d99c72cc ("tools/thermal: tmon: use pkg-config to determine library dependencies")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 tools/thermal/tmon/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 2e83dd3655a2..3777ab59d08c 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -11,6 +11,7 @@ TARGET=tmon
 
 INSTALL_PROGRAM=install -m 755 -p
 DEL_FILE=rm -f
+PKG_CONFIG?=pkg-config
 
 # Static builds might require -ltinfo, for instance
 ifneq ($(findstring -static, $(LDFLAGS)),)
@@ -18,8 +19,8 @@ STATIC := --static
 endif
 
 TMON_LIBS=-lm -lpthread
-TMON_LIBS += $(shell pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \
-		     pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \
+TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null || \
+		     $(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \
 		     echo -lpanel -lncurses)
 
 OBJS = tmon.o tui.o sysfs.o pid.o
-- 
2.1.0


             reply	other threads:[~2015-08-07 23:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 22:58 Florian Fainelli [this message]
2015-08-07 23:13 ` Brian Norris
2015-08-08 20:04   ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438988284-8453-1-git-send-email-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=computersforpeace@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®