mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 11:13:30 +08:00
74557dc6bb
* mpw-build.in: Add install action. * mpw-make.in (cplusfilt): Renamed from c++filt. (INCLUDES): Add more paths.
68 lines
1.5 KiB
Plaintext
68 lines
1.5 KiB
Plaintext
# Script fragment to build MPW binutils.
|
|
|
|
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}":
|
|
|
|
Set AR_PROG ar
|
|
Set RANLIB_PROG ranlib
|
|
# objcopy and strip should be the same program
|
|
Set OBJCOPY_PROG objcopy
|
|
Set STRIP_PROG strip
|
|
Set STRINGS_PROG strings
|
|
# These should all be the same program too.
|
|
Set SIZE_PROG size
|
|
Set NM_PROG nm
|
|
Set OBJDUMP_PROG objdump
|
|
# This is the demangler, as a standalone program.
|
|
Set DEMANGLER_PROG cplusfilt
|
|
Set NLMCONV_PROG nlmconv
|
|
|
|
Set PROGS "{SIZE_PROG} {OBJDUMP_PROG} {NM_PROG} {AR_PROG} {STRINGS_PROG} {STRIP_PROG} {RANLIB_PROG} {DEMANGLER_PROG} {OBJCOPY_PROG}"
|
|
|
|
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
|
|
# Need to copy all the tools
|
|
For prog in {PROGS}
|
|
Duplicate -y :{prog} "{bindir}"{prog}
|
|
End For
|
|
Else
|
|
Echo {BuildTarget} not a valid build target
|
|
End If
|