#!/bin/sh
# Generated automatically from auto.in by configure.

# added by K.Nagami: (
PACKAGE="parthenon"
VERSION="2.4.1"
prefix="/usr/local"
exec_prefix="/usr/local"
bindir="${exec_prefix}/bin"
datadir="${prefix}/share"
parthenon_prefix="${prefix}/parthenon"
parthenon_bindir="${parthenon_prefix}/com"
PATH="${PATH}:${parthenon_bindir}"; export PATH # to search for `parthenon_which'
makefile=`parthenon_which -d`/com/Makefile
parthenon_prefix=`parthenon_which -p`
if [ ! -f ${makefile} ]; then
  echo "auto: could not find ${makefile} for read."
  exit 1
fi
# added by K.Nagami: )

if [ $# = 2 ]
then
    if [ $2 = clean ]
    then
        make -f $makefile TARGET=$1 clean
        exit 0
    fi
fi
test=off
if [ $# != 4 ]
then
    if [ $# != 5 -o "$5" != test ]
    then
        echo "usage: auto <module_name> <result_tag> <foundry> <cell_library> [test]"
        echo "usage: auto <module_name> clean"
        echo "<result_tag> ::=  hsl | nld1 | nld2 | nld3 | nld4 | ps | tpm | glsh | lpr "
        echo "                |  v  |  gs  | gh   | interface"
        exit 1
    else
        test=on
    fi
fi
case $2 in
    glsh | lpr | v | gs | gh | interface )
        make -f $makefile TARGET=$1 FOUNDRY=$3 CELL_LIB_NAME=$4 PARTHEN=${parthenon_prefix} TEST=$test $2 ;;
    hsl )
        make -f $makefile TARGET=$1 FOUNDRY=$3 CELL_LIB_NAME=$4 PARTHEN=${parthenon_prefix} TEST=$test $1.0$test ;;
    nld1 )
        make -f $makefile TARGET=$1 FOUNDRY=$3 CELL_LIB_NAME=$4 PARTHEN=${parthenon_prefix} TEST=$test $1.1$test ;;
    nld2 )
        make -f $makefile TARGET=$1 FOUNDRY=$3 CELL_LIB_NAME=$4 PARTHEN=${parthenon_prefix} TEST=$test $1.2$test ;;
    nld3 )
        make -f $makefile TARGET=$1 FOUNDRY=$3 CELL_LIB_NAME=$4 PARTHEN=${parthenon_prefix} TEST=$test $1.3$test ;;
    nld4 )
        make -f $makefile TARGET=$1 FOUNDRY=$3 CELL_LIB_NAME=$4 PARTHEN=${parthenon_prefix} TEST=$test $1.4$test ;;
    * )
        make -f $makefile TARGET=$1 FOUNDRY=$3 CELL_LIB_NAME=$4 PARTHEN=${parthenon_prefix} TEST=$test $1.$2 ;;
esac
