Modified Files:
[deliverable/binutils-gdb.git] / mpw-build.in
CommitLineData
5db7ecb7
SS
1# Top-level script fragment to build everything for MPW.
2
3Set savedir "`Directory`"
4
5#Set Echo 1
6
aa8f28af 7Set ThisScript "{0}"
5db7ecb7
SS
8
9Set objdir ":"
10
11Set verify 0
5db7ecb7
SS
12
13Set BuildTarget "none"
14
5db7ecb7
SS
15# Parse arguments.
16
17Loop
18 Break If {#} == 0
5db7ecb7
SS
19 If "{BuildTarget}" =~ /none/
20 Set BuildTarget "{1}"
21 Else
22 Echo Only one build target allowed, ignoring "{1}"
23 End If
5db7ecb7
SS
24 Shift 1
25End Loop
26
aa8f28af
SS
27If {verify} == 1
28 Echo "#" Doing "{ThisScript}" "{BuildTarget}" in "`Directory`" ...
29End If
30
31If "`Exists Makefile`" != ""
32 Echo "Set Echo 1" >{BuildTarget}.makeout
33 Make -f Makefile {BuildTarget} >>{BuildTarget}.makeout
34 {BuildTarget}.makeout
35 Delete {BuildTarget}.makeout
36Else If "{BuildTarget}" =~ /all/
37 "{ThisScript}" all-gcc
38 "{ThisScript}" all-ld
39 "{ThisScript}" all-gdb
5db7ecb7 40Else If "{BuildTarget}" =~ /all-binutils/
aa8f28af
SS
41 "{ThisScript}" do-libiberty
42 "{ThisScript}" do-bfd
43 "{ThisScript}" do-opcodes
44 "{ThisScript}" do-binutils
5db7ecb7 45Else If "{BuildTarget}" =~ /all-gas/
aa8f28af
SS
46 "{ThisScript}" do-libiberty
47 "{ThisScript}" do-bfd
48 "{ThisScript}" do-opcodes
49 "{ThisScript}" do-gas
5db7ecb7 50Else If "{BuildTarget}" =~ /all-gcc/
aa8f28af
SS
51 "{ThisScript}" all-gas
52 "{ThisScript}" all-binutils
53 "{ThisScript}" do-gcc
5db7ecb7 54Else If "{BuildTarget}" =~ /all-gdb/
aa8f28af
SS
55 "{ThisScript}" do-libiberty
56 "{ThisScript}" do-bfd
57 "{ThisScript}" do-opcodes
58 "{ThisScript}" do-gdb
5db7ecb7 59Else If "{BuildTarget}" =~ /all-ld/
aa8f28af
SS
60 "{ThisScript}" do-libiberty
61 "{ThisScript}" do-bfd
62 "{ThisScript}" do-opcodes
63 "{ThisScript}" do-ld
5db7ecb7
SS
64Else If "{BuildTarget}" =~ /do-bfd/
65 SetDirectory :bfd:
aa8f28af 66 ::mpw-build all
5db7ecb7
SS
67Else If "{BuildTarget}" =~ /do-libiberty/
68 SetDirectory :libiberty:
aa8f28af 69 ::mpw-build all
5db7ecb7
SS
70Else If "{BuildTarget}" =~ /do-opcodes/
71 SetDirectory :opcodes:
aa8f28af 72 ::mpw-build all
5db7ecb7
SS
73Else If "{BuildTarget}" =~ /do-binutils/
74 SetDirectory :binutils:
aa8f28af 75 ::mpw-build all
5db7ecb7
SS
76Else If "{BuildTarget}" =~ /do-gas/
77 SetDirectory :gas:
aa8f28af 78 ::mpw-build all
5db7ecb7
SS
79Else If "{BuildTarget}" =~ /do-gcc/
80 SetDirectory :gcc:
aa8f28af 81 ::mpw-build all
5db7ecb7
SS
82Else If "{BuildTarget}" =~ /do-gdb/
83 SetDirectory :gdb:
aa8f28af 84 ::mpw-build all
5db7ecb7
SS
85Else If "{BuildTarget}" =~ /do-ld/
86 SetDirectory :ld:
aa8f28af 87 ::mpw-build all
5db7ecb7 88Else If "{BuildTarget}" =~ /install/
aa8f28af
SS
89 "{ThisScript}" install-binutils
90 "{ThisScript}" install-gas
91 "{ThisScript}" install-gcc
92# "{ThisScript}" install-gdb
93 "{ThisScript}" install-ld
5db7ecb7
SS
94Else If "{BuildTarget}" =~ /install-binutils/
95 SetDirectory :binutils:
aa8f28af 96 ::mpw-build install
5db7ecb7
SS
97Else If "{BuildTarget}" =~ /install-gas/
98 SetDirectory :gas:
aa8f28af 99 ::mpw-build install
5db7ecb7
SS
100Else If "{BuildTarget}" =~ /install-gcc/
101 SetDirectory :gcc:
aa8f28af 102 ::mpw-build install
5db7ecb7
SS
103Else If "{BuildTarget}" =~ /install-gdb/
104 SetDirectory :gdb:
aa8f28af 105 ::mpw-build install
5db7ecb7
SS
106Else If "{BuildTarget}" =~ /install-ld/
107 SetDirectory :ld:
aa8f28af 108 ::mpw-build install
5db7ecb7
SS
109Else
110End If
111
112SetDirectory "{savedir}"
This page took 0.043775 seconds and 4 git commands to generate.