summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh4
-rw-r--r--build.subr22
-rw-r--r--build.vars1
3 files changed, 21 insertions, 6 deletions
diff --git a/build.sh b/build.sh
index a9565bc1..d8485f0b 100755
--- a/build.sh
+++ b/build.sh
@@ -29,7 +29,9 @@ esac; shift; done;
[ -f ../midipix_build.vars ] && . ../midipix_build.vars;
. ./build.vars;
clear_env_with_except ${CLEAR_ENV_VARS_EXCEPT};
-check_path_vars ${CHECK_PATH_VARS}; check_prereqs ${CHECK_PREREQ_CMDS};
+check_path_vars ${CHECK_PATH_VARS};
+check_prereq_cmds ${CHECK_PREREQ_CMDS};
+check_prereq_files ${CHECK_PREREQ_FILES};
if ! [ -d ${PREFIX} ]; then
mkdir ${PREFIX};
fi;
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
diff --git a/build.vars b/build.vars
index ccb7b050..e6dd5a30 100644
--- a/build.vars
+++ b/build.vars
@@ -15,6 +15,7 @@
: ${BUILD_STATUS_IN_PROGRESS_FNAME:=${PREFIX}/BUILD_IN_PROGRESS};
: ${CFLAGS_DEFAULT:=-g3 -O0};
: ${CHECK_PREREQ_CMDS:="aclocal autoconf autopoint bunzip2 flex git gunzip install libtool make makeinfo mktemp openssl patch sed sort tar tee tr sha256sum wget xz"};
+: ${CHECK_PREREQ_FILES:="/usr/include/gmpxx.h /usr/include/mpc.h /usr/include/mpfr.h"};
: ${CHECK_PATH_VARS:="PREFIX PREFIX_NATIVE WORKDIR"};
: ${CLEAR_ENV_VARS_EXCEPT:="HOME PATH SHELL TERM USER"};
: ${GITROOT:=git://midipix.org};