Use meson subcommands in build.sh and clean.sh

This commit is contained in:
mid-kid 2024-03-08 21:51:12 +01:00
parent a9f6bc44dd
commit 363ecb4d54
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,5 @@
#!/bin/sh
set -e
target="test"
if [ "$#" -ge 1 ]; then
@ -10,4 +11,8 @@ fi
export NINJA_STATUS="[%p %f/%t] "
# Build the project
ninja -C build "$target" "$@"
if [ "$target" = test ]; then
"${MESON:-meson}" test -C build "$@"
else
"${MESON:-meson}" compile -C build "$target" "$@"
fi

View File

@ -1,3 +1,2 @@
#!/bin/sh
ninja -C build clean
"${MESON:-meson}" compile -C build --clean