summaryrefslogtreecommitdiffstats
path: root/Makefile.include
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2023-04-19 12:58:23 +0200
committerAnastasia Klimchuk <aklm@chromium.org>2023-05-10 03:02:07 +0000
commitfc7810e08788a91e59e0ceefe83fc46effda1020 (patch)
tree8be05dd8f1dfa22e58d9b890e3303330eb9ddd5b /Makefile.include
parent5ebdfb891f2b04d24d312f0ca307083be0ebfcc8 (diff)
downloadflashrom-fc7810e08788a91e59e0ceefe83fc46effda1020.tar.gz
flashrom-fc7810e08788a91e59e0ceefe83fc46effda1020.tar.bz2
flashrom-fc7810e08788a91e59e0ceefe83fc46effda1020.zip
Makefile: Build man-page only when sphinx is available
Currently, it's not possible to compile the upstream branch using the `make' command without sphinx beeing installed. Check if sphinx-build is installed and only then build or install the man-page. The problem was noticed from commit f4f2f3dd19784efa26fd5619b7a44b4cdf14b04c move manpage to sphinx. Change-Id: If1b81d9bc25ecac19d493b44b00a7c42d0643fe6 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/74519 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
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 a55f6f552..5f81ccc9d 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -52,6 +52,10 @@ 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 has_dependency # $1: dependency, $2: action/target
+$(if $(findstring $(strip $1),yes), $(strip $2))
+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