@@ -28,18 +28,18 @@ source "$LIBRARY/util/message.sh"
source "$LIBRARY/util/option.sh"
-declare -a build_options build_macros
+declare -a buildenv_options
for lib in "$LIBRARY/buildenv/"*.sh; do
source "$lib"
done
-readonly -a build_options build_macros
+readonly -a buildenv_options
prepare_buildenv() {
msg "$(gettext "Preparing build environment...")"
- for func in ${build_macros[@]}; do
+ for func in ${buildenv_options[@]}; do
$func
done
@@ -25,10 +25,9 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/option.sh"
-build_options+=('buildflags')
-build_macros+=('buildflags')
+buildenv_options+=('buildenv_buildflags')
-buildflags() {
+buildenv_buildflags() {
if check_option "buildflags" "n"; then
unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS
fi
@@ -26,12 +26,11 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/message.sh"
source "$LIBRARY/util/option.sh"
-build_options+=('ccache' 'distcc')
-build_macros+=('use_ccache' 'use_distcc')
+buildenv_options+=('buildenv_ccache' 'buildenv_distcc')
using_ccache=0
-use_ccache() {
+buildenv_ccache() {
if check_buildoption "ccache" "y"; then
if ! type -p ccache >/dev/null; then
error "$(gettext "Cannot find the %s binary required for compiler cache usage.")" "ccache"
@@ -45,7 +44,7 @@ use_ccache() {
fi
}
-use_distcc() {
+buildenv_distcc() {
if check_buildoption "distcc" "y"; then
if ! type -p distcc >/dev/null; then
error "$(gettext "Cannot find the %s binary required for distributed compilation.")" "distcc"
@@ -26,9 +26,9 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/option.sh"
-build_macros+=('debugflags')
+buildenv_options+=('buildenv_debugflags')
-debugflags() {
+buildenv_debugflags() {
if check_option "debug" "y"; then
DEBUG_CFLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
DEBUG_CXXFLAGS+=" -fdebug-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
@@ -25,10 +25,9 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/option.sh"
-build_options+=('makeflags')
-build_macros+=('makeflags')
+buildenv_options+=('buildenv_makeflags')
-makeflags() {
+buildenv_makeflags() {
if check_option "makeflags" "n"; then
unset MAKEFLAGS
fi