#! /bin/sh
#*******************************************************************************
# E.S.O. - VLT project
#
# "@(#) $Id: vltMakePanelDependencies,v 1.1.1.1 2003/02/20 10:44:07 mzampare Exp $" 
#
# who       when      what
# --------  --------  ----------------------------------------------
# gfilippi  17/02/95  created
# gfilippi  03/07/95  use vltMakeSetPanelShell to generate ../bin/panel

#************************************************************************
#   NAME
#   vltMakePanelDependencies - create the makefile to build a panel
# 
#   SYNOPSIS
#
#   vltMakePanelDependencies <panelName>
# 
#   DESCRIPTION
#   Utility used by vltMakefile to create the makefile to build a panel.
#   It is not intended to be used as a standalone command.
#
#   Each ../bin/<panel> script depends on the source file (src/<panel>.pan):
#
#   ../bin/<panelName>: <panelName> Makefile
#   <TAB>   -$(AT) echo "== Making script: $(panelName)";\
#                  vltMakeSetPanelShell <panelName>
#
#   The rules is written to standard output.
#
#   <panelName>  The panel to be treated
#
#
#   FILES
#   $VLTROOT/include/vltMakefile.all  
#
#   ENVIRONMENT
#
#   RETURN VALUES
#
#   SEE ALSO 
#   vltMakefile.all, Makefile, (GNU) make
#
#   GNU make - Edition 0.41, for make Version 3.64 Beta, April 93
#   VLT Software - Programming Standard - 1.0 10/03/93
#
#   BUGS    
#   Strictly speaking, this is not needed because, for the moment,
#   panels could be treated as scripts. Panels are handled as
#   separate items since now in case some special treatment will be
#   required in future.
#
#----------------------------------------------------------------------

if [ "${1}" != "" ]
then
    panelName=$1
else
    echo "ERROR: vltMakePanelDependencies called with no parameters" >&2
    exit 1
fi

echo "# Dependency file for panel: ${panelName}"
echo "# Created automatically by vltMakePanelDependencies -  `date '+%d.%m.%y %T'`"
echo "# DO NOT EDIT THIS FILE"

#
# define the dependency file dependent to the Makefile
echo "../object/${panelName}.dpan: Makefile"
echo ""

#
# write on output the rule to build the script.
echo "../bin/${panelName}: ${panelName}.pan Makefile"
echo "	\$(AT)echo \"== Making panel: ../bin/${panelName}\"; vltMakeSetPanelShell ${panelName}; "
#
# ___oOo___
