Skip to contentSkip to conversation

Makefile: Pass PKG_CONFIG_PATH to internal builds

PATCH New Phil Sutter 1 participant 1 message Feb 5

Subsystems (2)
lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH v2 1/1 Makefile: Pass PKG_CONFIG_PATH to internal builds

When building nftables git HEAD, I use a script which also builds libmnl and libnftnl in their respective repositories and populates PKG_CONFIG_PATH variable so nftables is linked against them instead of host libraries. This is mandatory as host-installed libraries are chronically outdated and linking against them would fail.

Pass this variable to build test suite as well as the VPATH build performed by distcheck target based on the presumption that if a custom PKG_CONFIG_PATH was needed for the main build, these derived builds will need it as well.

---
Changes since v1:
- Cover for distcheck as well
- Adjust patch description accordingly

---
 Makefile.am | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Makefile.am +3 -1
index c60c2e63d5aff..828146bc4fb1a 100644
@@ -23,7 +23,8 @@ libnftables_LIBVERSION = 2:0:1
 ###############################################################################
 
 ACLOCAL_AMFLAGS = -I m4
-AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck
+AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck \
+			       PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
 
 EXTRA_DIST =
 BUILT_SOURCES =
@@ -446,6 +447,7 @@ tools/nftables.service: tools/nftables.service.in ${top_builddir}/config.status
 endif
 
 if !BUILD_DISTCHECK
+AM_TESTS_ENVIRONMENT = PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
 TESTS = tests/build/run-tests.sh \
 	tests/json_echo/run-test.py \
 	tests/monitor/run-tests.sh \
Signature · 1 line
2.51.0