sh-elf-binutils/util.sh
Lephenixnoir 92ec440af8
new build system for fxSDK sysroot
* Configure and install so stuff ends up in the fxSDK sysroot
* Don't clean by default, make it a configuration called :clean
* :any now only skips build if the compiler is in the sysroot
* Redo README with proper tutorial

Details:
* Proper .gitignore
2022-08-19 15:03:06 +02:00

27 lines
538 B
Bash

TAG="<sh-elf-binutils>"
if command -v gmake >/dev/null 2>&1; then
MAKE_COMMAND=gmake
else
MAKE_COMMAND=make
fi
if ! command -v fxsdk >/dev/null 2>&1; then
echo "$TAG error: fxSDK is not installed"
exit 1
elif ! fxsdk path sysroot >/dev/null 2>&1; then
echo "$TAG error: need fxSDK ≥ 2.9 with 'path' command"
exit 1
fi
SYSROOT="$(fxsdk path sysroot)"
run_quietly() {
out="$1"
shift 1
"$@" >$out 2>&1
if [[ "$?" != 0 ]]; then
echo "$tag error: build failed, please check $(pwd)/$out o(x_x)o"
exit 1
fi
}