aboutsummaryrefslogtreecommitdiff
path: root/ld/mpw-build.in
blob: 45a5f32389f3dac45c0c6bb1d7946dc4cabb27f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Script fragment to build MPW GAS.

Set BuildTarget "none"

Loop
	Break If {#} == 0
	If "{1}" =~ /--srcdir/
		Set srcdir "{2}"
		Shift 1
	Else If "{1}" =~ /--topdir/
		Set topsrcdir "{2}"
		Shift 1
	Else If "{1}" =~ /--prefix/
		Set prefix "{2}"
		Shift 1
	Else If "{1}" =~ /-v/
		Set verify 1
		Set verifystr "-v"
		Shift 1
	Else
		If "{BuildTarget}" =~ /none/
			Set BuildTarget "{1}"
		Else
			Echo Only one build target allowed, ignoring "{1}"
		End If
	End If
	Shift 1
End Loop

Set libsubdir "{libdir}"gcc-lib:"{target_canonical}":"{version}":

If "{BuildTarget}" =~ /all/
	Echo "Set Echo 1" >all.makeout
	Make >>all.makeout
	all.makeout
	Delete all.makeout
Else If "{BuildTarget}" =~ /install/
	If "`Exists "{prefix}"`" == ""
		Echo "{prefix}" does not exist, cannot install anything
		Exit 1
	End If
	If "`Exists "{bindir}"`" == ""
		NewFolder "{bindir}"
	End If
	Duplicate -y :ld.new "{bindir}"ld
Else
	Echo {BuildTarget} not a valid build target
End If