summaryrefslogtreecommitdiffhomepage
path: root/subr/pre_setup_env.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-19 14:21:25 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-20 14:46:55 +0000
commit49b46005e7f7ebebcf6b43d451918c5462ac28d4 (patch)
treed226c2bb06d084911b70118e466e23a2de45ae0a /subr/pre_setup_env.subr
parentd27197213a39dd05dee64788ce185f6805207292 (diff)
downloadmidipix_build-49b46005e7f7ebebcf6b43d451918c5462ac28d4.tar.bz2
midipix_build-49b46005e7f7ebebcf6b43d451918c5462ac28d4.tar.xz
vars/{build,env}.vars: diet, pt. II.
vars/build.vars: install w/ `DESTDIR=<prefix> PREFIX= prefix=' by default. vars/build.vars:cmake: build w/ -g0 -O2. vars/cmake.vars: build using cmake_host. vars/pkgconf_host.vars: remove & don't install ${PREFIX}/bin/pkg-config link to avoid confusing host packages. vars/{apr_util,chainport}.vars: replaced w/ corresponding ${PKG_BUILD_STEPS}. patches/perl-5.22.1.local.patch: pass -L. -lperl when linking. patches/smallbasic.local.patch: don't call pcre-config. subr/pkg_autoconf.subr, vars/{lib{caca,udns},toilet}.vars: always install config.sub after bootstrap. subr/pkg_disabled.subr: always silently finish disabled packages. subr/pkg_setup_{env,vars}.subr: split. subr/pkg_{build,install}.subr: always pass LIBTOOL=${PKG_SLIBTOOL:=slibtool}. subr/pkg_{{build,work}_dir,extract,setup_env}.subr: infer ${PKG_BUILD_DIR} from ${PKG_SUBDIR} given the absence of configure{,.{ac,in}}.
Diffstat (limited to 'subr/pre_setup_env.subr')
-rw-r--r--subr/pre_setup_env.subr15
1 files changed, 14 insertions, 1 deletions
diff --git a/subr/pre_setup_env.subr b/subr/pre_setup_env.subr
index d5de2772..8bef5820 100644
--- a/subr/pre_setup_env.subr
+++ b/subr/pre_setup_env.subr
@@ -8,9 +8,22 @@ pre_setup_env() {
&& [ -e /proc/cpuinfo ]; then
BUILD_CPUS=$(awk '/^processor/{cpus++} END{print cpus}' /proc/cpuinfo);
fi;
- for __ in ${HOME}/midipix_build.vars ../midipix_build.vars ./vars/build.vars; do
+ : ${ARCH:=nt64}; : ${BUILD:=debug};
+ if [ "${ARCH}" = nt32 ]; then
+ TARGET="i686-nt32-midipix";
+ elif [ "${ARCH}" = nt64 ]; then
+ TARGET="x86_64-nt64-midipix";
+ else
+ if [ "${BUILD}" != debug ]\
+ && [ "${BUILD}" != release ]; then
+ log_msg failexit "Error: unknown build type \`${BUILD}'.";
+ fi;
+ log_msg failexit "Error: invalid architecture \`${ARCH}'.";
+ fi;
+ for __ in ${HOME}/midipix_build.vars ../midipix_build.vars ./vars/env.vars ./vars/build.vars; do
[ -e ${__} ] && . ${__};
done;
+ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
if [ ${ARG_IPV4_ONLY:-0} -eq 1 ]; then
WGET_ARGS="-4${WGET_ARGS:+ ${WGET_ARGS}}";
elif [ ${ARG_IPV6_ONLY:-0} -eq 1 ]; then