summaryrefslogtreecommitdiffstats
path: root/Makefile.include
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2022-08-12 19:52:23 +0200
committerThomas Heijligen <src@posteo.de>2022-08-23 08:42:38 +0000
commit73e28a747256ff3a881d2bc2da744ebdcde90339 (patch)
tree69f4e90cd5781fbe4427b5a1ddd849a3ee96ed4e /Makefile.include
parente4137c6913c7a84e5a4a8e0b4fd571d5d0b78616 (diff)
downloadflashrom-73e28a747256ff3a881d2bc2da744ebdcde90339.tar.gz
flashrom-73e28a747256ff3a881d2bc2da744ebdcde90339.tar.bz2
flashrom-73e28a747256ff3a881d2bc2da744ebdcde90339.zip
Makefile: print dependency versions
When a library is found, then print its version in the config target. Change-Id: Ie1ff8107311247fba9e5caa252d559447c871867 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66695 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'Makefile.include')
-rw-r--r--Makefile.include4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.include b/Makefile.include
index fbd845699..a55f6f552 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -48,6 +48,10 @@ define find_dependency
$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --exists $1 && echo yes || echo no)
endef
+define dependency_version
+$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --modversion $1 2>/dev/null)
+endef
+
define dependency_cflags
$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --cflags $1 2>/dev/null)
endef