#!/bin/sh TARGET=$1 DIR=build-"$TARGET" CONFIGURE=do-"$TARGET"-configure shift ANALYZER="-Danalyzer=true" # Disable analyzer on m68k because the compiler gets very confused # about complex values case "$TARGET" in *m68k*) ANALYZER="" ;; esac # Disable the analyser when not using tinystdio as the stdio code is # full of problems case "$*" in *-Dtinystdio=false*) ANALYZER="" ;; esac mkdir "$DIR" trap 'rm -rf "$DIR"' 0 1 15 (cd "$DIR" || exit 1 echo '##################################################' echo '##########' ../scripts/"$CONFIGURE" -Dwerror=true $ANALYZER "$@" echo '##################################################' ../scripts/"$CONFIGURE" -Dwerror=true $ANALYZER "$@" case $? in 0) echo 'Configuration succeeded' ;; 77) echo 'Configuration skipped' exit 0 ;; *) echo 'Configuration failed with' "$?" cat meson-logs/* exit 1 ;; esac cat meson-logs/* ninja && meson test -t 20 -v) || exit 1