#!/bin/sh

OLD_OTAGS=`which otags`
NEW_OTAGS=./otags

printf "$1 : "

printf "(ocamlc `ocamlc -version`) "
ocamlc -c $1

printf "(otags `${OLD_OTAGS} -version | cut '-d ' -f 2` "
${OLD_OTAGS} -emacs -o $1.tags.old $1

printf "`${NEW_OTAGS} -version | cut '-d ' -f 2`) : "
${NEW_OTAGS} -emacs -o $1.tags.new $1

if diff -u $1.tags.old $1.tags.new; then printf "passed"; else printf "failed"; fi
printf "\n"

#rm -f $1.tags.old $1.tags.new
