#
# BuildAll {Parmeters}
#
# This builds the 10 cDevs that Darryl builds, the control panel
# NDA and and CDEVINIT.
#
# 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


#
# Copy our special files into PiigsInclude
#

directory {myparent}CtlPanelIntfs:
duplicate  -y CDEVMgr.pii 
		  CDEVMgrData.aii 
		  NewInterface.pii 
		  ResMgr.pii 
		  {PIIGSInclude}

directory {myparent}CtlPanelNDA:
BuildProgram {Parameters} CtlPanel.NDA
#directory {myparent}CDEV.INIT:
#BuildProgram {Parameters} CDEV.Init
directory {myparent}MonitorCDEV:
BuildProgram {Parameters} Monitor
directory {myparent}RamDiskCDEV:
BuildProgram {Parameters} RAMDisk
directory {myparent}KeyboardCDEV:
BuildProgram {Parameters} Keyboard
directory {myparent}GeneralCDEV:
BuildProgram {Parameters} General
directory {myparent}SoundCDEV:
BuildProgram {Parameters} Sound
directory {myparent}PrinterCDEV:
BuildProgram {Parameters} Printer
directory {myparent}TimeCDEV:
BuildProgram {Parameters} Time
directory {myparent}ModemCDEV:
BuildProgram {Parameters} Modem
directory {myparent}SlotsCDEV:
BuildProgram {Parameters} Slots
directory {myparent}DirectConnectCDEV
BuildProgram {Parameters} DirectConnect
directory {myparent}AppleShareCDEV
BuildProgram {Parameters} AppleShare

directory {myparent}NetPrinterCDEV
BuildProgram {Parameters} NetPrinter
directory {myparent}NamerCDEV
BuildProgram {Parameters} Namer
directory {myparent}MIDICDEV
BuildProgram {Parameters} Midi
directory {myparent}SetStartCDev
Echo "# `Date -t` --- This is actually building SetStart!"
BuildProgram All
directory {myparent}FolderPrivCDEV
BuildProgram {Parameters} FolderPriv
Directory {MyParent}NetWorkCDev
BuildProgram {Parameters} NetWork
Directory {MyParent}SoundCDev:Sounds
BuildProgram {Parameters} Sounds

directory {myparent}