srcdir=${srcdir-.}
builddir=${builddir-.}
-log="$builddir/rulescomp.log"
+name=rulescomp
+prog="$builddir/$name$EXEEXT"
+log="$builddir/$name.log"
compile()
{
- echo "${builddir}/rulescomp '$1' '$2' '$3' '$4' '$5'" >>"$log"
- ${builddir}/rulescomp "$1" "$2" "$3" "$4" "$5" >>"$log" 2>&1 || exit $?
+ echo "$prog '$1' '$2' '$3' '$4' '$5'" >>"$log"
+ $prog "$1" "$2" "$3" "$4" "$5" >>"$log" 2>&1 || exit $?
}
failcompile()
{
- echo "${builddir}/rulescomp '$1' '$2' '$3' '$4' '$5'" >>"$log"
- if ${builddir}/rulescomp "$1" "$2" "$3" "$4" "$5" >>"$log" 2>&1; then
+ echo "$prog '$1' '$2' '$3' '$4' '$5'" >>"$log"
+ if $prog "$1" "$2" "$3" "$4" "$5" >>"$log" 2>&1; then
exit 1
fi
}
srcdir=${srcdir-.}
builddir=${builddir-.}
-log="$builddir/xkey.log"
+name=xkey
+prog="$builddir/$name$EXEEXT"
+log="$builddir/$name.log"
check_error()
{
check_string()
{
- echo "${builddir}/xkey -s '$1'" >>"$log"
- val=`${builddir}/xkey -s "$1"` &&
+ echo "$prog -s '$1'" >>"$log"
+ val=`$prog -s "$1"` &&
echo "$val" >>"$log" &&
check_error "$1" "$2" "$val" >>"$log" 2>&1 ||
exit $?
check_key()
{
- echo "${builddir}/xkey -k '$1'" >>"$log"
- val=`${builddir}/xkey -k "$1"` && \
+ echo "$prog -k '$1'" >>"$log"
+ val=`$prog -k "$1"` && \
echo "$val" >>"$log" &&
check_error "$1" "$2" "$val" >>"$log" 2>&1 || \
exit $?