mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-09 02:15:32 +00:00
Use a shared function standard_meson_build to prep the resources/meson.build folder for consistency. A future cleanup would be to use meson-utils.inc.sh for all meson build scripts.
49 lines
No EOL
1.4 KiB
Bash
49 lines
No EOL
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# This script contains common meson functions
|
|
|
|
source "$KEYMAN_ROOT/resources/build/meson/standard_meson_build.inc.sh"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# clean
|
|
# ----------------------------------------------------------------------------
|
|
|
|
do_meson_clean() {
|
|
rm -rf "$THIS_SCRIPT_PATH/resources"
|
|
rm -rf "$TARGET_PATH"
|
|
}
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# configure
|
|
# ----------------------------------------------------------------------------
|
|
|
|
do_meson_configure() {
|
|
# Import our standard compiler defines
|
|
standard_meson_build
|
|
|
|
pushd "$THIS_SCRIPT_PATH" > /dev/null
|
|
# Additional arguments are used by Linux build, e.g. -Dprefix=${INSTALLDIR}
|
|
meson setup build --buildtype $BUILDER_CONFIGURATION "${builder_extra_params[@]}"
|
|
popd > /dev/null
|
|
|
|
}
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# build
|
|
# ----------------------------------------------------------------------------
|
|
|
|
do_meson_build() {
|
|
pushd "$TARGET_PATH" > /dev/null
|
|
ninja
|
|
popd > /dev/null
|
|
}
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# test
|
|
# ----------------------------------------------------------------------------
|
|
|
|
do_meson_test() {
|
|
pushd "$TARGET_PATH" > /dev/null
|
|
meson test "${builder_extra_params[@]}"
|
|
popd > /dev/null
|
|
} |