mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 22:52:34 +02:00

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>
66 lines
2.1 KiB
Makefile
66 lines
2.1 KiB
Makefile
#
|
|
# This file is part of the flashrom project.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; version 2 of the License.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
|
|
# Here are functions and macros defined for the Makefile
|
|
|
|
define mark_unsupported
|
|
$(foreach p,$1, \
|
|
$(if $(filter $($(p)),yes), \
|
|
$(eval UNSUPPORTED_FEATURES += $(p)=yes), \
|
|
$(eval override $(p) := no)))
|
|
endef
|
|
|
|
define filter_deps
|
|
$(strip $(foreach p,$1, \
|
|
$(if $(filter $($(p)),yes), \
|
|
$(p))))
|
|
endef
|
|
|
|
define disable_all
|
|
$(foreach p,$1, \
|
|
$(eval override $(p) := no))
|
|
endef
|
|
|
|
# Run the C Preprocessor with file $1 and return the last line, removing quotes.
|
|
define c_macro_test
|
|
$(strip $(call debug_shell, $(CC) -E $1 | tail -1 | tr -d '"'))
|
|
endef
|
|
|
|
define c_compile_test # $1: files to compile, $2: cflags
|
|
$(call debug_shell, $(CC) -c -Wall -Werror $2 $1 -o /dev/null && echo yes || echo no)
|
|
endef
|
|
|
|
define c_link_test # $1: file to compile and link, $2: cflags, $3: ldflags
|
|
$(call debug_shell, $(CC) -Wall -Werror $2 $1 $3 -o /dev/null && echo yes || echo no)
|
|
endef
|
|
|
|
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 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
|
|
|
|
define dependency_ldflags
|
|
$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --libs --static $1 2>/dev/null)
|
|
endef
|