old-cross-binutils/mpw-build.in
Stan Shebs aa8f28af4b Sun Feb 27 16:05:15 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-configure (prefix, mpw_prefix): Handle it.
	(ARCHDEFS): Add to makefile editing.
	(TDEPFILES, TM_FILE, XDEPFILES, XM_FILE, NAT_FILE): Add to
	makefile if defined.
	(mpw-edit-prefix): Use during makefile editing.
	* mpw-config.in (mmalloc, readline): Don't configure.
	* mpw-build.in (thisscript): Rename to ThisScript.
	Use mpw-build instead of BuildProgram everywhere.
	(mmalloc, readline): Don't build.
	* mpw-README: New file, basic documentation about the MPW port.
1994-02-28 00:15:29 +00:00

112 lines
2.6 KiB
Text

# Top-level script fragment to build everything for MPW.
Set savedir "`Directory`"
#Set Echo 1
Set ThisScript "{0}"
Set objdir ":"
Set verify 0
Set BuildTarget "none"
# Parse arguments.
Loop
Break If {#} == 0
If "{BuildTarget}" =~ /none/
Set BuildTarget "{1}"
Else
Echo Only one build target allowed, ignoring "{1}"
End If
Shift 1
End Loop
If {verify} == 1
Echo "#" Doing "{ThisScript}" "{BuildTarget}" in "`Directory`" ...
End If
If "`Exists Makefile`" != ""
Echo "Set Echo 1" >{BuildTarget}.makeout
Make -f Makefile {BuildTarget} >>{BuildTarget}.makeout
{BuildTarget}.makeout
Delete {BuildTarget}.makeout
Else If "{BuildTarget}" =~ /all/
"{ThisScript}" all-gcc
"{ThisScript}" all-ld
"{ThisScript}" all-gdb
Else If "{BuildTarget}" =~ /all-binutils/
"{ThisScript}" do-libiberty
"{ThisScript}" do-bfd
"{ThisScript}" do-opcodes
"{ThisScript}" do-binutils
Else If "{BuildTarget}" =~ /all-gas/
"{ThisScript}" do-libiberty
"{ThisScript}" do-bfd
"{ThisScript}" do-opcodes
"{ThisScript}" do-gas
Else If "{BuildTarget}" =~ /all-gcc/
"{ThisScript}" all-gas
"{ThisScript}" all-binutils
"{ThisScript}" do-gcc
Else If "{BuildTarget}" =~ /all-gdb/
"{ThisScript}" do-libiberty
"{ThisScript}" do-bfd
"{ThisScript}" do-opcodes
"{ThisScript}" do-gdb
Else If "{BuildTarget}" =~ /all-ld/
"{ThisScript}" do-libiberty
"{ThisScript}" do-bfd
"{ThisScript}" do-opcodes
"{ThisScript}" do-ld
Else If "{BuildTarget}" =~ /do-bfd/
SetDirectory :bfd:
::mpw-build all
Else If "{BuildTarget}" =~ /do-libiberty/
SetDirectory :libiberty:
::mpw-build all
Else If "{BuildTarget}" =~ /do-opcodes/
SetDirectory :opcodes:
::mpw-build all
Else If "{BuildTarget}" =~ /do-binutils/
SetDirectory :binutils:
::mpw-build all
Else If "{BuildTarget}" =~ /do-gas/
SetDirectory :gas:
::mpw-build all
Else If "{BuildTarget}" =~ /do-gcc/
SetDirectory :gcc:
::mpw-build all
Else If "{BuildTarget}" =~ /do-gdb/
SetDirectory :gdb:
::mpw-build all
Else If "{BuildTarget}" =~ /do-ld/
SetDirectory :ld:
::mpw-build all
Else If "{BuildTarget}" =~ /install/
"{ThisScript}" install-binutils
"{ThisScript}" install-gas
"{ThisScript}" install-gcc
# "{ThisScript}" install-gdb
"{ThisScript}" install-ld
Else If "{BuildTarget}" =~ /install-binutils/
SetDirectory :binutils:
::mpw-build install
Else If "{BuildTarget}" =~ /install-gas/
SetDirectory :gas:
::mpw-build install
Else If "{BuildTarget}" =~ /install-gcc/
SetDirectory :gcc:
::mpw-build install
Else If "{BuildTarget}" =~ /install-gdb/
SetDirectory :gdb:
::mpw-build install
Else If "{BuildTarget}" =~ /install-ld/
SetDirectory :ld:
::mpw-build install
Else
End If
SetDirectory "{savedir}"