Commit cf4ccd63 by Jeff Law

#

	* mpw-* Delete.  Not used.
	* ltconfig, ltmain.sh: Update to libtool 1.2a.
	* Makefile.in (CC_FOR_TARGET): Use $(TARGET_SUBDIR) when passing -B
	for newlib directory.
	(CXX_FOR_TARGET): Likewise.
Bring over from devo.

From-SVN: r19691
parent 9c7d6038
# 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 "{BuildTarget}" =~ /none/
Set BuildTarget "all"
End If
If {verify} == 1
Echo "#" Doing "{ThisScript}" "{BuildTarget}" in "`Directory`" ...
End If
Set ranmake 0
If "`Exists Makefile`" != ""
Echo "Set Echo 1" >{BuildTarget}.makeout
Make -f Makefile {BuildTarget} >>{BuildTarget}.makeout
{BuildTarget}.makeout
Delete {BuildTarget}.makeout
Set ranmake 1
End If
If "`Exists Makefile.PPC`" != ""
Echo "Set Echo 1" >{BuildTarget}.makeout.ppc
Make -f Makefile.PPC {BuildTarget} >>{BuildTarget}.makeout.ppc
{BuildTarget}.makeout.ppc
Delete {BuildTarget}.makeout.ppc
Set ranmake 1
End If
If {ranmake} == 1
Exit
End If
# Dispatch on various pseudo-targets.
If "{BuildTarget}" =~ /all/
Echo Started `Date`
"{ThisScript}" all-gcc
"{ThisScript}" all-gdb
Echo Finished `Date`
Else If "{BuildTarget}" =~ /all-libiberty/
"{ThisScript}" do-libiberty
Else If "{BuildTarget}" =~ /all-bfd/
"{ThisScript}" do-bfd
Else If "{BuildTarget}" =~ /all-opcodes/
"{ThisScript}" do-opcodes
Else If "{BuildTarget}" =~ /all-byacc/
"{ThisScript}" do-byacc
Else If "{BuildTarget}" =~ /all-flex/
"{ThisScript}" all-libiberty
"{ThisScript}" do-flex
Else If "{BuildTarget}" =~ /all-binutils/
"{ThisScript}" all-libiberty
"{ThisScript}" all-bfd
"{ThisScript}" all-opcodes
"{ThisScript}" do-binutils
Else If "{BuildTarget}" =~ /all-gas/
"{ThisScript}" all-libiberty
"{ThisScript}" all-bfd
"{ThisScript}" all-opcodes
"{ThisScript}" do-gas
Else If "{BuildTarget}" =~ /all-gcc/
"{ThisScript}" all-libiberty
"{ThisScript}" all-gas
"{ThisScript}" all-binutils
"{ThisScript}" all-ld
"{ThisScript}" do-gcc
Else If "{BuildTarget}" =~ /all-gdb/
"{ThisScript}" all-libiberty
"{ThisScript}" all-bfd
"{ThisScript}" all-opcodes
"{ThisScript}" do-gdb
Else If "{BuildTarget}" =~ /all-grez/
"{ThisScript}" all-libiberty
"{ThisScript}" all-bfd
"{ThisScript}" do-grez
Else If "{BuildTarget}" =~ /all-ld/
"{ThisScript}" all-libiberty
"{ThisScript}" all-bfd
"{ThisScript}" all-opcodes
"{ThisScript}" do-ld
Else If "{BuildTarget}" =~ /do-byacc/
SetDirectory :byacc:
::mpw-build all
Else If "{BuildTarget}" =~ /do-flex/
SetDirectory :flex:
::mpw-build _bootstrap
::mpw-build all
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 stamps
::mpw-build all
Else If "{BuildTarget}" =~ /do-gas/
SetDirectory :gas:
::mpw-build stamps
::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-grez/
SetDirectory :grez:
::mpw-build all
Else If "{BuildTarget}" =~ /do-ld/
SetDirectory :ld:
::mpw-build all
Else If "{BuildTarget}" =~ /do-newlib/
SetDirectory :newlib:
::mpw-build all
Else If "{BuildTarget}" =~ /install/
"{ThisScript}" install-only-top
"{ThisScript}" install-binutils
"{ThisScript}" install-gas
"{ThisScript}" install-gcc
"{ThisScript}" install-ld
"{ThisScript}" install-gdb
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-grez/
SetDirectory :grez:
::mpw-build install
Else If "{BuildTarget}" =~ /install-ld/
SetDirectory :ld:
::mpw-build install
Else If "{BuildTarget}" =~ /install-only/
"{ThisScript}" install-only-top
"{ThisScript}" install-only-binutils
"{ThisScript}" install-only-gas
"{ThisScript}" install-only-gcc
"{ThisScript}" install-only-gdb
"{ThisScript}" install-only-ld
Else If "{BuildTarget}" =~ /install-only-binutils/
SetDirectory :binutils:
::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-gas/
SetDirectory :gas:
::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-gcc/
SetDirectory :gcc:
:mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-gdb/
SetDirectory :gdb:
::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-grez/
SetDirectory :grez:
::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-ld/
SetDirectory :ld:
::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-top/
NewFolderRecursive "{prefix}"
If "{prefix}" != "`Directory`"
Duplicate -y 'Read Me for MPW' "{prefix}"'Read Me for MPW'
Duplicate -y Install "{prefix}"Install
End If
Else
Echo {BuildTarget} not understood, ignoring
End If
SetDirectory "{savedir}"
# Configuration fragment for Cygnus source tree.
# Check that we can find all the special tools that we will need.
# The test for sed is semi-pointless, because it's already been invoked
# by the calculation of target_cpu in the main configure script, but
# the test will also show which one is being used.
Set Exit 0
Echo byacc is `Which byacc`
Echo flex is `Which flex`
Echo forward-include is `Which forward-include`
Echo MoveIfChange is `Which MoveIfChange`
Echo mpw-touch is `Which mpw-touch`
Echo mpw-true is `Which mpw-true`
Echo NewFolderRecursive is `Which NewFolderRecursive`
Echo null-command is `Which null-command`
Echo open-brace is `Which open-brace`
Echo sed is `Which sed`
Echo 'tr-7to8' is `Which tr-7to8`
Echo true is `Which true`
Set Exit 1
Set host_libs "mmalloc libiberty opcodes bfd readline gash tcl tk tclX"
Set host_tools "texinfo byacc flex bison binutils ld gas gcc gdb make patch \Option-d
prms send-pr gprof gdbtest tgas etc expect dejagnu sim bash \Option-d
m4 autoconf ispell grep diff rcs cvs fileutils shellutils time \Option-d
textutils wdiff find emacs emacs19 uudecode hello tar gzip indent \Option-d
recode release sed utils guile perl apache inet gawk"
Set target_libs "newlib"
Set target_tools "examples"
# Configure the resource compiler if targeting Macs.
If {target_os} =~ /macos/ || {target_os} =~ /mpw/
Set host_tools "{host_tools} grez"
End If
Set configdirs "{host_libs} {host_tools} {target_libs} {target_tools}"
Export configdirs
# Make up a special include directory that tools will share.
If "`Exists "{objdir}"extra-include`" == ""
NewFolder "{objdir}"extra-include
End If
Set edir "{objdir}extra-include:"
forward-include "{srcdir}"include:mpw:sys:file.h "{edir}"'sys/file.h'
forward-include "{srcdir}"include:mpw:sys:ioctl.h "{edir}"'sys/ioctl.h'
forward-include "{srcdir}"include:mpw:sys:param.h "{edir}"'sys/param.h'
forward-include "{srcdir}"include:mpw:sys:resource.h "{edir}"'sys/resource.h'
forward-include "{srcdir}"include:mpw:sys:stat.h "{edir}"'sys/stat.h'
forward-include "{srcdir}"include:mpw:sys:time.h "{edir}"'sys/time.h'
forward-include "{srcdir}"include:mpw:sys:types.h "{edir}"'sys/types.h'
forward-include "{srcroot}"include:aout:aout64.h "{edir}"'aout/aout64.h'
forward-include "{srcroot}"include:aout:ar.h "{edir}"'aout/ar.h'
forward-include "{srcroot}"include:aout:ranlib.h "{edir}"'aout/ranlib.h'
forward-include "{srcroot}"include:aout:reloc.h "{edir}"'aout/reloc.h'
forward-include "{srcroot}"include:aout:stab.def "{edir}"'aout/stab.def'
forward-include "{srcroot}"include:aout:stab_gnu.h "{edir}"'aout/stab_gnu.h'
If "`Exists "{srcroot}"include:aout:"{target_cpu}".h`" != ""
forward-include "{srcroot}"include:aout:"{target_cpu}".h "{edir}"'aout/'"{target_cpu}"'.h'
End If
forward-include "{srcroot}"include:coff:ecoff.h "{edir}"'coff/ecoff.h'
forward-include "{srcroot}"include:coff:internal.h "{edir}"'coff/internal.h'
forward-include "{srcroot}"include:coff:sym.h "{edir}"'coff/sym.h'
forward-include "{srcroot}"include:coff:symconst.h "{edir}"'coff/symconst.h'
If "`Exists "{srcroot}"include:coff:"{target_cpu}".h`" != ""
forward-include "{srcroot}"include:coff:"{target_cpu}".h "{edir}"'coff/'"{target_cpu}"'.h'
End If
If "{target_cpu}" =~ /powerpc/
forward-include "{srcroot}"include:coff:rs6000.h "{edir}"'coff/rs6000.h'
End If
forward-include "{srcroot}"include:elf:common.h "{edir}"'elf/common.h'
forward-include "{srcroot}"include:elf:dwarf.h "{edir}"'elf/dwarf.h'
forward-include "{srcroot}"include:elf:dwarf2.h "{edir}"'elf/dwarf2.h'
forward-include "{srcroot}"include:elf:external.h "{edir}"'elf/external.h'
forward-include "{srcroot}"include:elf:internal.h "{edir}"'elf/internal.h'
# Believe it or not, GDB needs this for all targets.
forward-include "{srcroot}"include:elf:mips.h "{edir}"'elf/mips.h'
If "`Exists "{srcroot}"include:elf:"{target_cpu}".h`" != ""
forward-include "{srcroot}"include:elf:"{target_cpu}".h "{edir}"'elf/'"{target_cpu}"'.h'
End If
If "{target_cpu}" =~ /powerpc/
forward-include "{srcroot}"include:elf:ppc.h "{edir}"'elf/ppc.h'
End If
If "`Exists "{srcroot}"include:opcode:"{target_cpu}".h`" != ""
forward-include "{srcroot}"include:opcode:"{target_cpu}".h "{edir}"'opcode/'"{target_cpu}"'.h'
End If
If "{target_cpu}" =~ /powerpc/
forward-include "{srcroot}"include:opcode:ppc.h "{edir}"'opcode/ppc.h'
End If
# Add some bfd includes that get mentioned outside the bfd dir.
forward-include "{srcroot}"bfd:libcoff.h "{edir}"'bfd/libcoff.h'
forward-include "{srcroot}"bfd:libecoff.h "{edir}"'bfd/libecoff.h'
# Translate random files into MPW-only character set.
tr-7to8 "{srcdir}"mpw-README > "{objdir}Read Me for MPW"
tr-7to8 "{srcdir}"mpw-install > "{objdir}"Install
# GNU Install script for MPW.
Set OldExit "{Exit}"
Set Exit 0
Set TempUserStartup "{TempFolder}"__temp__UserStartup
Echo '# UserStartup generated by GNU Install script' > "{TempUserStartup}"
Echo '' >> "{TempUserStartup}"
# (should) Check that disk space is sufficient for installation.
# Assume that the install script is where everything else is.
Set thisdir "`Directory`"
# Copy the binaries to the desired place.
Confirm -t "Copy the binaries to somewhere else?"
Set TmpStatus {Status}
If {TmpStatus} == 0
Set bindest "`GetFileName -d -m "Where to install the binaries?"`"
If {Status} == 0
If "`Exists "{thisdir}bin"`" != ""
For afile In "{thisdir}"bin:\Option-x
Duplicate -y "{afile}" "{bindest}"
End For
Else
Echo "bin directory not found, exiting"
Exit 1
End If
Else
Echo "No destination supplied, exiting"
Exit 1
End If
Else If {TmpStatus} == 4
# Use the existing directory.
Set bindest "{thisdir}bin:"
Else
# Cancelled from confirmation, escape altogether.
Exit 1
End If
# Copy the libraries to the desired place.
Confirm -t "Copy the libraries to somewhere else?"
Set TmpStatus {Status}
If {TmpStatus} == 0
Set libdest "`GetFileName -d -m "Where to install the libraries?"`"
If {Status} == 0
If "`Exists "{thisdir}lib:"`" != ""
For afile In "{thisdir}"lib:\Option-x
Duplicate -y "{afile}" "{libdest}"
End For
Else
Echo "lib directory not found, exiting"
Exit 1
End If
Else
Echo "No destination supplied, exiting"
Exit 1
End If
Else If {TmpStatus} == 4
# Use the existing directory.
Set libdest "{thisdir}lib:"
Else
# Cancelled from confirmation, escape altogether.
Exit 1
End If
# Add the location of the binaries to the command path.
Echo -n 'Set Commands "' >> "{TempUserStartup}"
Echo -n "{bindest}" >> "{TempUserStartup}"
Echo ',{Commands}"' >> "{TempUserStartup}"
Echo '' >> "{TempUserStartup}"
# Set up GCC exec prefix.
Set gcclibdir "{libdest}"gcc-lib:
Echo -n 'Set GCC_EXEC_PREFIX "' >> "{TempUserStartup}"
Echo -n "{gcclibdir}" >> "{TempUserStartup}"
Echo '"' >> "{TempUserStartup}"
Echo "Export GCC_EXEC_PREFIX" >> "{TempUserStartup}"
Echo '' >> "{TempUserStartup}"
# Set up path to libgcc.xcoff etc.
Echo -n 'Set GCCPPCLibraries "' >> "{TempUserStartup}"
Echo -n "{libdest}" >> "{TempUserStartup}"
Echo '"' >> "{TempUserStartup}"
Echo "Export GCCPPCLibraries" >> "{TempUserStartup}"
Echo '' >> "{TempUserStartup}"
# Display contents of UserStartup, confirm installation.
Set UserStartupName "UserStartup\Option-8GNU"
Echo "Contents of" {UserStartupName} "will be:"
Catenate "{TempUserStartup}"
Confirm "Install {UserStartupName} into the MPW folder {MPW} ?"
If {Status} == 0
Duplicate "{TempUserStartup}" "{MPW}{UserStartupName}"
Delete -y "{TempUserStartup}"
Else
Echo "{UserStartupName} file not installed"
End If
# (should) Check HEXA resource, warn if low.
# (should) Check for spaces in pathnames, warn if found.
Echo "Installation was successful."
Echo ""
Echo "Be sure to review the usage notes in 'Read Me for MPW' before proceeding!"
# Restore previous settings.
Set Exit "{OldExit}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment