#
# BuildAll {Parmeters}
#
# This builds the medica control drivers that Dan H. builds, its CDev
# and NDA.
#
# All options are passed on the BuildProgram script.
#
##################################################################


# The following code permits this script to be executed from
#   anywhere, and for subsidiary scripts to do anything they
#   want to the directory prefixes without messing up the
#   overall build.
# CRUCIAL ASSUMPTION: All subdirectories containing control panel
#   source are in the directory containing this script file.
# Jim Merritt thanks Jim Mensch for digging up the regular expression
#   in the evaluate command below, and John Dance for supplying
#   a foolproof way for a shellscript to come up with its own full
#   pathname.  Wotta great bunch of guys!

set myparent `files -f {Command}`
(evaluate "{myparent}" =~ /(([:]*:)+)1[:]*/ ) > Dev:Null
set myparent "{1}"
IF "{myparent}" == ""
  echo "*** ERROR:  Cannot determine script home directory."
  exit
END


directory {myparent}P4200:
BuildProgram {Parameters} P4200
directory {myparent}Pioneer2000:
BuildProgram {Parameters} P2000
directory {myparent}AppleCDSC:
BuildProgram {Parameters} AppleCDSC
directory {myparent}MediaCtlCDev:
BuildProgram {Parameters} MediaCtrl
directory {myparent}MediaCtlNDA:
BuildProgram {Parameters} MediaCtlNDA


directory {myparent}