1#!/bin/sh 2TARGET=$1 3DIR=build-"$TARGET" 4CONFIGURE=do-"$TARGET"-configure 5shift 6 7ANALYZER="-Danalyzer=true" 8 9# Disable analyzer on m68k because the compiler gets very confused 10# about complex values 11 12case "$TARGET" in 13 *m68k*) 14 ANALYZER="" 15 ;; 16esac 17 18# Disable the analyser when not using tinystdio as the stdio code is 19# full of problems 20 21case "$*" in 22 *-Dtinystdio=false*) 23 ANALYZER="" 24 ;; 25esac 26 27mkdir "$DIR" 28trap 'rm -rf "$DIR"' 0 1 15 29(cd "$DIR" || exit 1 30 echo '##################################################' 31 echo '##########' ../scripts/"$CONFIGURE" -Dwerror=true $ANALYZER "$@" 32 echo '##################################################' 33 ../scripts/"$CONFIGURE" -Dwerror=true $ANALYZER "$@" 34 case $? in 35 0) 36 echo 'Configuration succeeded' 37 ;; 38 77) 39 echo 'Configuration skipped' 40 exit 0 41 ;; 42 *) 43 echo 'Configuration failed with' "$?" 44 cat meson-logs/* 45 exit 1 46 ;; 47 esac 48 cat meson-logs/* 49 ninja && meson test -t 20 -v) || exit 1 50