1#! @SHELL@
2
3# The script is designed to be invoked from a "Makefile",
4# notice the command "$MAKE $pgm" below.
5
6MAKE="@MAKE@"
7ECHO_N="@ECHO_N@"
8ECHO_C="@ECHO_C@"
9ECHO_T="@ECHO_T@"
10RM="@RM@"
11
12execbasename=`basename $0`
13MPE_OUTFILE="mpe2_${execbasename}.txt"
14
15pgm=$1
16message=$2
17
18echo
19echo ${ECHO_N} "$message ${ECHO_C}"
20$RM -f $pgm
21$MAKE $pgm > $MPE_OUTFILE 2>&1
22if [ -x $pgm ] ; then
23    echo "${ECHO_T}Yes."
24    $RM -f $pgm
25else
26    echo "${ECHO_T}No."
27    echo "    The failed command is :"
28    cat $MPE_OUTFILE
29fi
30$RM -f $MPE_OUTFILE
31