From 74b6fcd2a088c5183b5545267e3a2bdb785e0afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Thu, 23 Jun 2016 15:28:54 +0200 Subject: build.{sh,subr,vars}: adds check_prereq_files() and ${CHECK_PREREQ_FILES} checking for gmp, mpc, and mpfr. (/usr/include/gmpxx.h /usr/include/mpc.h /usr/include/mpfr.h) --- build.subr | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'build.subr') diff --git a/build.subr b/build.subr index 6122212f..7858378b 100644 --- a/build.subr +++ b/build.subr @@ -214,15 +214,27 @@ check_path_vars() { }; # Check whether all supplied command names resolve. -check_prereqs() { +check_prereq_cmds() { while [ ${#} -gt 0 ]; do if ! command -v ${1} >/dev/null; then - _cp_missing_list="${1}${_cp_missing_list:+ ${_cp_missing_list}}"; + _cpc_missing_list="${1}${_cpc_missing_list:+ ${_cpc_missing_list}}"; fi; shift; done; - if [ -n "${_cp_missing_list}" ]; then - log_msg failexit "Error: missing prerequisite command(s): ${_cp_missing_list}."; - fi; unset _cp_missing_list; + if [ -n "${_cpc_missing_list}" ]; then + log_msg failexit "Error: missing prerequisite command(s): ${_cpc_missing_list}."; + fi; unset _cpc_missing_list; +}; + +# Check whether all supplied pathnames resolve. +check_prereq_files() { + while [ ${#} -gt 0 ]; do + if [ ! -e ${1} ]; then + _cpf_missing_list="${1}${_cpf_missing_list:+ ${_cpf_missing_list}}"; + fi; shift; + done; + if [ -n "${_cpf_missing_list}" ]; then + log_msg failexit "Error: missing prerequisite file(s): ${_cpf_missing_list}."; + fi; unset _cpf_missing_list; }; # Clear the environment by unsetting each exported variable except -- cgit v1.2.3