Split exported build variables into buildenv_vars_exported.
This commit is contained in:
parent
e41d018398
commit
3d7fb3213f
3 changed files with 8 additions and 7 deletions
|
@ -3,7 +3,7 @@
|
|||
# buildenv.sh - functions for altering the build environment before
|
||||
# compilation
|
||||
#
|
||||
# Copyright (c) 2015-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||
# Copyright (c) 2015-2024 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,8 +24,8 @@ LIBMAKEPKG_BUILDENV_SH=1
|
|||
|
||||
MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
||||
|
||||
declare -a buildenv_functions build_options
|
||||
buildenv_vars=('CPPFLAGS' 'CFLAGS' 'CXXFLAGS' 'LDFLAGS' 'MAKEFLAGS' 'CHOST')
|
||||
declare -a buildenv_functions buildenv_vars build_options
|
||||
buildenv_vars_exported=('CPPFLAGS' 'CFLAGS' 'CXXFLAGS' 'LDFLAGS' 'MAKEFLAGS' 'CHOST')
|
||||
|
||||
for lib in "$MAKEPKG_LIBRARY/buildenv/"*.sh; do
|
||||
source "$lib"
|
||||
|
@ -55,5 +55,5 @@ prepare_buildenv() {
|
|||
done
|
||||
|
||||
# ensure all necessary build variables are exported
|
||||
export ${buildenv_vars[@]}
|
||||
export ${buildenv_vars_exported[@]}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# buildflags.sh - Clear user-specified buildflags if requested
|
||||
#
|
||||
# Copyright (c) 2011-2022 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||
# Copyright (c) 2011-2024 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -29,6 +29,6 @@ build_options+=('buildflags')
|
|||
|
||||
buildenv_buildflags() {
|
||||
if check_option "buildflags" "n"; then
|
||||
unset ${buildenv_vars[@]}
|
||||
unset ${buildenv_vars_exported[@]}
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ MAKEPKG_LIBRARY=${MAKEPKG_LIBRARY:-'@libmakepkgdir@'}
|
|||
source "$MAKEPKG_LIBRARY/util/option.sh"
|
||||
source "$MAKEPKG_LIBRARY/util/util.sh"
|
||||
|
||||
buildenv_vars+=('RUSTFLAGS' 'DEBUG_RUSTFLAGS')
|
||||
buildenv_vars+=('DEBUG_RUSTFLAGS')
|
||||
buildenv_vars_exported+=('RUSTFLAGS')
|
||||
buildenv_functions+=('buildenv_rust')
|
||||
|
||||
buildenv_rust() {
|
||||
|
|
Loading…
Add table
Reference in a new issue