2015-09-05 10:22:41 +02:00
|
|
|
#
|
2018-03-05 21:49:08 +01:00
|
|
|
# This helper is for templates using scons.
|
2015-09-05 10:22:41 +02:00
|
|
|
#
|
|
|
|
do_build() {
|
|
|
|
: ${make_cmd:=scons}
|
|
|
|
|
|
|
|
${make_cmd} ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \
|
2020-05-17 14:39:37 +02:00
|
|
|
cc=$CC cxx=$CXX ccflags="$CFLAGS" \
|
2015-09-05 10:22:41 +02:00
|
|
|
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
|
2020-05-17 14:39:37 +02:00
|
|
|
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
|
|
|
|
RANLIB="$RANLIB" ranlib="$RANLIB" \
|
2022-09-02 17:49:18 +02:00
|
|
|
prefix=/usr \
|
|
|
|
${scons_use_destdir:+DESTDIR="${DESTDIR}"} \
|
|
|
|
${scons_use_destdir:+destdir="${DESTDIR}"} \
|
2015-09-05 10:22:41 +02:00
|
|
|
${make_build_args} ${make_build_target}
|
|
|
|
}
|
|
|
|
do_install() {
|
|
|
|
: ${make_cmd:=scons}
|
|
|
|
: ${make_install_target:=install}
|
|
|
|
|
2022-09-02 17:49:18 +02:00
|
|
|
local _sandbox=
|
|
|
|
|
|
|
|
if [ -z "$scons_use_destdir" ]; then _sandbox=yes ; fi
|
|
|
|
|
2015-09-05 10:22:41 +02:00
|
|
|
${make_cmd} ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \
|
2020-05-17 14:39:37 +02:00
|
|
|
cc=$CC cxx=$CXX ccflags="$CFLAGS" \
|
2015-09-05 10:22:41 +02:00
|
|
|
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
|
2020-05-17 14:39:37 +02:00
|
|
|
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
|
|
|
|
RANLIB="$RANLIB" ranlib="$RANLIB" \
|
2022-09-02 17:49:18 +02:00
|
|
|
prefix=/usr \
|
|
|
|
${scons_use_destdir:+DESTDIR="${DESTDIR}"} \
|
|
|
|
${scons_use_destdir:+destdir="${DESTDIR}"} \
|
|
|
|
${_sandbox:+--install-sandbox="${DESTDIR}"} \
|
2015-09-05 10:22:41 +02:00
|
|
|
${make_install_args} ${make_install_target}
|
|
|
|
}
|