1994-01-15 21:46:29 +01:00
|
|
|
# Top-level script fragment to build everything for MPW.
|
|
|
|
|
|
|
|
Set savedir "`Directory`"
|
|
|
|
|
|
|
|
#Set Echo 1
|
|
|
|
|
1994-02-28 01:15:29 +01:00
|
|
|
Set ThisScript "{0}"
|
1994-01-15 21:46:29 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
1994-02-28 01:15:29 +01:00
|
|
|
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
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /all-binutils/
|
1994-02-28 01:15:29 +01:00
|
|
|
"{ThisScript}" do-libiberty
|
|
|
|
"{ThisScript}" do-bfd
|
|
|
|
"{ThisScript}" do-opcodes
|
|
|
|
"{ThisScript}" do-binutils
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /all-gas/
|
1994-02-28 01:15:29 +01:00
|
|
|
"{ThisScript}" do-libiberty
|
|
|
|
"{ThisScript}" do-bfd
|
|
|
|
"{ThisScript}" do-opcodes
|
|
|
|
"{ThisScript}" do-gas
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /all-gcc/
|
1994-02-28 01:15:29 +01:00
|
|
|
"{ThisScript}" all-gas
|
|
|
|
"{ThisScript}" all-binutils
|
|
|
|
"{ThisScript}" do-gcc
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /all-gdb/
|
1994-02-28 01:15:29 +01:00
|
|
|
"{ThisScript}" do-libiberty
|
|
|
|
"{ThisScript}" do-bfd
|
|
|
|
"{ThisScript}" do-opcodes
|
|
|
|
"{ThisScript}" do-gdb
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /all-ld/
|
1994-02-28 01:15:29 +01:00
|
|
|
"{ThisScript}" do-libiberty
|
|
|
|
"{ThisScript}" do-bfd
|
|
|
|
"{ThisScript}" do-opcodes
|
|
|
|
"{ThisScript}" do-ld
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /do-bfd/
|
|
|
|
SetDirectory :bfd:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build all
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /do-libiberty/
|
|
|
|
SetDirectory :libiberty:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build all
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /do-opcodes/
|
|
|
|
SetDirectory :opcodes:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build all
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /do-binutils/
|
|
|
|
SetDirectory :binutils:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build all
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /do-gas/
|
|
|
|
SetDirectory :gas:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build all
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /do-gcc/
|
|
|
|
SetDirectory :gcc:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build all
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /do-gdb/
|
|
|
|
SetDirectory :gdb:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build all
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /do-ld/
|
|
|
|
SetDirectory :ld:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build all
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /install/
|
1994-02-28 01:15:29 +01:00
|
|
|
"{ThisScript}" install-binutils
|
|
|
|
"{ThisScript}" install-gas
|
|
|
|
"{ThisScript}" install-gcc
|
|
|
|
# "{ThisScript}" install-gdb
|
|
|
|
"{ThisScript}" install-ld
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /install-binutils/
|
|
|
|
SetDirectory :binutils:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build install
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /install-gas/
|
|
|
|
SetDirectory :gas:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build install
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /install-gcc/
|
|
|
|
SetDirectory :gcc:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build install
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /install-gdb/
|
|
|
|
SetDirectory :gdb:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build install
|
1994-01-15 21:46:29 +01:00
|
|
|
Else If "{BuildTarget}" =~ /install-ld/
|
|
|
|
SetDirectory :ld:
|
1994-02-28 01:15:29 +01:00
|
|
|
::mpw-build install
|
1994-01-15 21:46:29 +01:00
|
|
|
Else
|
|
|
|
End If
|
|
|
|
|
|
|
|
SetDirectory "{savedir}"
|