Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/Makefile.in: synchronize pkg-config settings between HOST_{CONFIGURE_OPTS, MAKE_ENV}
Date: Fri, 14 Oct 2016 16:09:44 +0200	[thread overview]
Message-ID: <20161014140944.9436-1-peter@korsgaard.com> (raw)

The pkg-config settings in HOST_CONFIGURE_OPTS and HOST_MAKE_ENV have
diverged over time, so they now used different _LIBDIR and
_ALLOW_SYSTEM_{CFLAGS,LIBS} settings.

Conceptually _CONFIGURE_OPTS should be a superset of _MAKE_ENV, so move the
definitions around and define _CONFIGURE_OPTS in terms of _MAKE_ENV instead
of repeating the individual settings.

Do this both for the target and host variant for consistency.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/Makefile.in | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index b4a4c60..98e30b4 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -235,8 +235,10 @@ export PERL=$(shell which perl)
 # finds this perl module by exporting the proper value for PERL5LIB.
 export PERL5LIB=$(HOST_DIR)/usr/lib/perl
 
+TARGET_MAKE_ENV = PATH=$(BR_PATH)
+
 TARGET_CONFIGURE_OPTS = \
-	PATH=$(BR_PATH) \
+	$(TARGET_MAKE_ENV) \
 	AR="$(TARGET_AR)" \
 	AS="$(TARGET_AS)" \
 	LD="$(TARGET_LD)" \
@@ -275,11 +277,17 @@ TARGET_CONFIGURE_OPTS = \
 	STAGING_DIR="$(STAGING_DIR)" \
 	INTLTOOL_PERL=$(PERL)
 
-TARGET_MAKE_ENV = PATH=$(BR_PATH)
 
+HOST_MAKE_ENV = \
+	PATH=$(BR_PATH) \
+	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
+	PKG_CONFIG_SYSROOT_DIR="/" \
+	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
+	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
+	PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig"
 
 HOST_CONFIGURE_OPTS = \
-	PATH=$(BR_PATH) \
+	$(HOST_MAKE_ENV) \
 	AR="$(HOSTAR)" \
 	AS="$(HOSTAS)" \
 	LD="$(HOSTLD)" \
@@ -294,19 +302,8 @@ HOST_CONFIGURE_OPTS = \
 	CFLAGS="$(HOST_CFLAGS)" \
 	CXXFLAGS="$(HOST_CXXFLAGS)" \
 	LDFLAGS="$(HOST_LDFLAGS)" \
-	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
-	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
-	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-	PKG_CONFIG_SYSROOT_DIR="/" \
-	PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \
 	INTLTOOL_PERL=$(PERL)
 
-HOST_MAKE_ENV = \
-	PATH=$(BR_PATH) \
-	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-	PKG_CONFIG_SYSROOT_DIR="/" \
-	PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"
-
 # This is extra environment we can not export ourselves (eg. because some
 # packages use that variable internally, eg. uboot), so we have to
 # explicitly pass it to user-supplied external hooks (eg. post-build,
-- 
2.9.3

             reply	other threads:[~2016-10-14 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 14:09 Peter Korsgaard [this message]
2016-10-14 14:19 ` [Buildroot] [PATCH] package/Makefile.in: synchronize pkg-config settings between HOST_{CONFIGURE_OPTS, MAKE_ENV} Arnout Vandecappelle
2016-10-14 14:50 ` Peter Korsgaard

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=20161014140944.9436-1-peter@korsgaard.com \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /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