#	BuildMenu - create the Build menu
#
#	Usage:
#		BuildMenu
#
#	BuildMenu creates the menu shown below.
#
#		Build
#
#		  Create Build Commands…
#		  -------------------------
#		  Build… 					 #B
#		  Full Build…
#		  Show Build Commands…
#		  Show Full Build Commands…
#
#
#	Copyright Apple Computer, Inc. 1987 - 1990
#	All rights reserved.


Set Exit 0
DeleteMenu Build ≥ Dev:Null
AddMenu Build 'Create Build Commands…' ∂
'Set NewProgram "`Commando CreateMake || Echo Set Status 0`"; ∂
  Exit If "{NewProgram}" == ""; ∂
(Set Program `{NewProgram} ≥ "{ShellDirectory}"MPW.Errors ∂
  || Alert < "{ShellDirectory}"MPW.Errors`|| set status 0) ∑ Dev:Null'

AddMenu Build '(-' ''
AddMenu Build 'Build…/B' ∂
	'Begin; ∂
	 Set NewProgram "`Request "Program Name?" -d "{Program}" || Echo '""'`"; ∂
	 Exit If "{NewProgram}" == ""; ∂
	 Set Program "{NewProgram}"; ∂
	 Open "{Worksheet}"; ∂
	 Echo; Echo; ∂
	 BuildProgram "{Program}"; ∂
	 End >> "{Worksheet}" ≥≥ Dev:StdOut'
AddMenu Build 'Full Build…' ∂
	'Begin; ∂
	 Set NewProgram "`Request "Program Name?" -d "{Program}" || Echo '""'`"; ∂
	 Exit If "{NewProgram}" == ""; ∂
	 Set Program "{NewProgram}"; ∂
	 Open "{Worksheet}"; ∂
	 Echo; Echo; ∂
	 BuildProgram -e "{Program}"; ∂
	 End >> "{Worksheet}" ≥≥ Dev:StdOut'
AddMenu Build 'Show Build Commands…' ∂
	'Begin; ∂
	Set NewProgram "`Request "Program Name?" -d "{Program}" || Echo '""'`"; ∂
	 Exit If "{NewProgram}" == ""; ∂
	 Set Program "{NewProgram}"; ∂
	 Open "{Worksheet}"; ∂
	 Echo; Echo; ∂
	 BuildCommands "{Program}"; ∂
	 End >> "{Worksheet}" ≥≥ Dev:StdOut'
AddMenu Build 'Show Full Build Commands…' ∂
	'Begin; ∂
	 Set NewProgram "`Request "Program Name?" -d "{Program}" || Echo '""'`"; ∂
	 Exit If "{NewProgram}" == ""; ∂
	 Set Program "{NewProgram}"; ∂
	 Open "{Worksheet}"; ∂
	 Echo; Echo; ∂
	 BuildCommands -e "{Program}"; ∂
	 End >> "{Worksheet}" ≥≥ Dev:StdOut'
Exit 0
