From: Que Quotion <quequotion@gmail.com> Signed-off-by: Que Quotion <quequotion@gmail.com> --- scripts/libmakepkg/buildenv.sh.in | 6 +++--- scripts/libmakepkg/buildenv/buildflags.sh.in | 5 ++--- scripts/libmakepkg/buildenv/compiler.sh.in | 7 +++---- scripts/libmakepkg/buildenv/debugflags.sh.in | 4 ++-- scripts/libmakepkg/buildenv/makeflags.sh.in | 5 ++--- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/scripts/libmakepkg/buildenv.sh.in b/scripts/libmakepkg/buildenv.sh.in index 9c1f02f4..91e99780 100644 --- a/scripts/libmakepkg/buildenv.sh.in +++ b/scripts/libmakepkg/buildenv.sh.in @@ -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 diff --git a/scripts/libmakepkg/buildenv/buildflags.sh.in b/scripts/libmakepkg/buildenv/buildflags.sh.in index 55d7fbce..1a21241d 100644 --- a/scripts/libmakepkg/buildenv/buildflags.sh.in +++ b/scripts/libmakepkg/buildenv/buildflags.sh.in @@ -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 diff --git a/scripts/libmakepkg/buildenv/compiler.sh.in b/scripts/libmakepkg/buildenv/compiler.sh.in index dec19ac8..b7bb1d65 100644 --- a/scripts/libmakepkg/buildenv/compiler.sh.in +++ b/scripts/libmakepkg/buildenv/compiler.sh.in @@ -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" diff --git a/scripts/libmakepkg/buildenv/debugflags.sh.in b/scripts/libmakepkg/buildenv/debugflags.sh.in index 1ad2ad8b..ac5f76db 100644 --- a/scripts/libmakepkg/buildenv/debugflags.sh.in +++ b/scripts/libmakepkg/buildenv/debugflags.sh.in @@ -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}" diff --git a/scripts/libmakepkg/buildenv/makeflags.sh.in b/scripts/libmakepkg/buildenv/makeflags.sh.in index b0c438d2..0e5bb36b 100644 --- a/scripts/libmakepkg/buildenv/makeflags.sh.in +++ b/scripts/libmakepkg/buildenv/makeflags.sh.in @@ -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 -- 2.19.1