summaryrefslogtreecommitdiffhomepage
path: root/build.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-07 16:34:58 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-07 16:34:58 +0100
commit96b3097e548d741fe34bc2b54b5f59c725c06cec (patch)
treeb52ebabf5dfdd62c0c4b1e88bed4b3f3566de179 /build.subr
parent680d83f768298ed0fcabd553f5d48ee8facf203b (diff)
downloadmidipix_build-96b3097e548d741fe34bc2b54b5f59c725c06cec.tar.bz2
midipix_build-96b3097e548d741fe34bc2b54b5f59c725c06cec.tar.xz
- Ensure global variable names are consistently capitalised and that
no values are inherited when and wherever they should not be. - Remove pointless CFLAGS export in 007.gcc.full.build when doing a runtime or full build.
Diffstat (limited to 'build.subr')
-rw-r--r--build.subr16
1 files changed, 11 insertions, 5 deletions
diff --git a/build.subr b/build.subr
index ab829f7c..f07e297a 100644
--- a/build.subr
+++ b/build.subr
@@ -104,15 +104,21 @@ parse_with_pkg_name() {
CC CFLAGS LDFLAGS DESTDIR; do
_vNAME=$(echo "${_vname}" | tr a-z A-Z);
if [ -n "${_vval:=$(eval echo \${PKG_${_pkg_NAME}_${_vNAME}})}" ]; then
- export _pkg_${_vname}="${_vval}";
+ export PKG_${_vNAME}="${_vval}";
if [ "x${_vname#[A-Z]}" != "x${_vname}" ]; then
export ${_vname}="${_vval}";
fi;
+ else
+ unset PKG_${_vNAME};
fi; unset _vval;
done; unset _pkg_NAME _vname _vNAME;
- _pkg_fname=${_pkg_url##*/};
- _pkg_subdir=${_pkg_fname%%.tar*};
- return 0;
+ if [ -z "${PKG_URL}" ]; then
+ return 1;
+ else
+ PKG_FNAME=${PKG_URL##*/};
+ PKG_SUBDIR=${PKG_FNAME%%.tar*};
+ return 0;
+ fi;
fi; shift;
done; return 1;
};
@@ -133,7 +139,7 @@ rm_if_exists() {
};
set_build_dir() {
- _build_dir=${1}-${2}-${TARGET};
+ BUILD_DIR=${1}-${2}-${TARGET};
};
set_env_vars() {