#!/bin/csh
#	@(#)makecall	1.3	06/19/97
#
#
#     $Id: makecall,v 1.1.2.1 2002/09/13 20:51:19 avvede Exp $
#     $Log: makecall,v $
#     Revision 1.1.2.1  2002/09/13 20:51:19  avvede
#     Merged
#
#     Revision 1.3  2002/09/13 20:08:36  avvede
#     *** empty log message ***
#
#     Revision 1.2  2002/09/13 20:04:23  avvede
#     Fixed location of makecall.csh
#
#     Revision 1.1  1998/03/16 20:02:54  avvede
#     Initial move to CVS
#
#
#
#
#	Copyright (c) 1986, 1987, 1988 by
#	Periphonics Corporation
#	4000 Veterans Memorial Highway
#	Bohemia
#	NY 11716
#
#	This software is furnished under a license and may be used and
#	copied only in accordance with the terms of such license and with
#	the inclusion of the above copyright notice. This software or any
#	other copies thereof, may not be provided or otherwise made available
#	to anyone other than the licensee. Title to and ownership of this
#	software remains with the Periphonics Corporation.
#
#	The information in this document is subject to change without notice
#	and should not be construed as a commitment by Periphonics.
#
#	Periphonics assumes no responsibility for the use or reliability of
#	its software on equipment that is not supplied by Periphonics.
#
#	File Name:
#		makecall
#
#	Description:
#		Procedure to put called applications into a library.
#		See usage line below.
#
#	Change				Reason
#	No.	Date		Name	for Change
#
#	0	24-aug-92	lmg	File created instead of original makecall
#					which has been moved to makecall.csh.
#					It will lock other makecalls from running.
#	1	19-jun-97	lmg	Lock /tmp/makecall.lock.
#
if ( ${?ASEHOME} == 0 ) then
	echo "$0 : Environment ASEHOME is not set"
	exit 1
endif

if ( ${?VPSHOME} == 0 ) then
	echo "$0 : Environment VPSHOME is not set"
	exit 1
endif

if ( -f ${ASEHOME}/rbin/makecall.csh ) then
	set makecall_csh = ${ASEHOME}/rbin/makecall.csh
endif

if ( -f ${ASEHOME}/bin/makecall.csh ) then
	set makecall_csh = ${ASEHOME}/bin/makecall.csh
endif

if ( -f ${VPSHOME}/bin/makecall.csh ) then
	set makecall_csh = ${VPSHOME}/bin/makecall.csh
endif

if ( ${?makecall_csh} == 0 ) then
		echo "$0 : Cannot find file makecall.csh"
		exit 1
endif


touch /tmp/makecall.lock

liblocker  -f /tmp/makecall.lock ${makecall_csh} $*

"rm" -f /tmp/makecall.lock
