#!/bin/sh
###########################################################
# Copyright (C) 2001-2009, CompHEP Collaboration
###########################################################
export COMPHEP=@CHEP@

if (test -x usr/mk_tab.exe) then
  if [ x$1 = xDEBUG ]; then
    (export COMPHEP=$COMPHEP;ddd usr/mk_tab.exe)
  else
    usr/mk_tab.exe $1 $2 $3 $4 $5 $6
  fi
else
  make -C usr
  if (test -x usr/mk_tab.exe) then
    if [ x$1 = xDEBUG ]; then
      (export COMPHEP=$COMPHEP;ddd usr/mk_tab.exe)
    else
      usr/mk_tab.exe $1 $2 $3 $4 $5 $6
    fi
  else
    echo ""
    echo "  mk_tab (error): no file usr/mix.exe. Compile CompHEP"
    echo ""
    exit -1
  fi
fi
