1
0
Fork 0
mirror of https://github.com/xHyroM/void-packages.git synced 2024-11-24 15:21:06 +01:00
void-packages/common/build-style/scons.sh

36 lines
1 KiB
Bash
Raw Normal View History

2024-03-29 08:12:19 +01:00
#
# This helper is for templates using scons.
#
do_build() {
: ${make_cmd:=scons}
${make_cmd} ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \
cc=$CC cxx=$CXX ccflags="$CFLAGS" \
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
RANLIB="$RANLIB" ranlib="$RANLIB" \
prefix=/usr \
${scons_use_destdir:+DESTDIR="${DESTDIR}"} \
${scons_use_destdir:+destdir="${DESTDIR}"} \
${make_build_args} ${make_build_target}
}
do_install() {
: ${make_cmd:=scons}
: ${make_install_target:=install}
local _sandbox=
if [ -z "$scons_use_destdir" ]; then _sandbox=yes ; fi
${make_cmd} ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \
cc=$CC cxx=$CXX ccflags="$CFLAGS" \
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
RANLIB="$RANLIB" ranlib="$RANLIB" \
prefix=/usr \
${scons_use_destdir:+DESTDIR="${DESTDIR}"} \
${scons_use_destdir:+destdir="${DESTDIR}"} \
${_sandbox:+--install-sandbox="${DESTDIR}"} \
${make_install_args} ${make_install_target}
}