2023-07-26 17:19:26 +00:00
|
|
|
#!/bin/sh
|
2024-03-08 20:51:12 +00:00
|
|
|
set -e
|
2023-07-18 17:58:03 +00:00
|
|
|
|
2023-07-26 17:27:10 +00:00
|
|
|
target="test"
|
|
|
|
if [ "$#" -ge 1 ]; then
|
|
|
|
target="$1"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2023-07-18 17:58:03 +00:00
|
|
|
# Set up env variable to show % of completion during ninja build
|
|
|
|
export NINJA_STATUS="[%p %f/%t] "
|
|
|
|
|
2024-01-29 03:05:12 +00:00
|
|
|
# Build the project
|
2024-03-08 20:51:12 +00:00
|
|
|
if [ "$target" = test ]; then
|
|
|
|
"${MESON:-meson}" test -C build "$@"
|
2024-03-17 04:55:31 +00:00
|
|
|
elif [ "$target" = rom ]; then
|
|
|
|
"${MESON:-meson}" compile -C build "pokeplatinum.us.nds"
|
2024-03-08 20:51:12 +00:00
|
|
|
else
|
|
|
|
"${MESON:-meson}" compile -C build "$target" "$@"
|
|
|
|
fi
|