From aa8f28af4b5ffa3eb67b9b51db0ab3c436be7ace Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Mon, 28 Feb 1994 00:15:29 +0000 Subject: [PATCH] Sun Feb 27 16:05:15 1994 Stan Shebs (shebs@andros.cygnus.com) * mpw-configure (prefix, mpw_prefix): Handle it. (ARCHDEFS): Add to makefile editing. (TDEPFILES, TM_FILE, XDEPFILES, XM_FILE, NAT_FILE): Add to makefile if defined. (mpw-edit-prefix): Use during makefile editing. * mpw-config.in (mmalloc, readline): Don't configure. * mpw-build.in (thisscript): Rename to ThisScript. Use mpw-build instead of BuildProgram everywhere. (mmalloc, readline): Don't build. * mpw-README: New file, basic documentation about the MPW port. --- mpw-README | 25 +++++++++++ mpw-build.in | 120 +++++++++++++++++++++----------------------------- mpw-config.in | 2 +- mpw-configure | 31 +++++++++++-- 4 files changed, 105 insertions(+), 73 deletions(-) create mode 100644 mpw-README diff --git a/mpw-README b/mpw-README new file mode 100644 index 00000000000..c762c9a3424 --- /dev/null +++ b/mpw-README @@ -0,0 +1,25 @@ +This is preliminary information about the Mac MPW port of the Cygnus tools. + +To build everything, create an object directory, setdirectory into it, and do: + + ::src:mpw-configure --target --srcdir ::src: --prefix + +Then + mpw-build all + +will build everything, and + + mpw-build install + +will install it. + +KNOWN BUGS + +ar rc xxx doesn't work. + +objdump -i idiocy where it creates dummy files. + +objcopy -O srec foo.o makes weird output filenames. + +Mac host requires -mgas but Unix hosts don't. + diff --git a/mpw-build.in b/mpw-build.in index a581e626a14..c9ea70d508b 100644 --- a/mpw-build.in +++ b/mpw-build.in @@ -4,126 +4,108 @@ Set savedir "`Directory`" #Set Echo 1 -Set thisscript "{0}" - -Set topsrcdir ":" - -Set srcdir ":" +Set ThisScript "{0}" Set objdir ":" Set verify 0 -Set verifystr "" Set BuildTarget "none" -Set prefix "{Boot}"Cygnus:latest: - # Parse arguments. 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 -If "{BuildTarget}" =~ /all/ - "{thisscript}" all-ld - "{thisscript}" all-gcc - "{thisscript}" all-gdb +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 Else If "{BuildTarget}" =~ /all-binutils/ - "{thisscript}" do-libiberty - "{thisscript}" do-bfd - "{thisscript}" do-opcodes - "{thisscript}" do-binutils + "{ThisScript}" do-libiberty + "{ThisScript}" do-bfd + "{ThisScript}" do-opcodes + "{ThisScript}" do-binutils Else If "{BuildTarget}" =~ /all-gas/ - "{thisscript}" do-libiberty - "{thisscript}" do-bfd - "{thisscript}" do-opcodes - "{thisscript}" do-gas + "{ThisScript}" do-libiberty + "{ThisScript}" do-bfd + "{ThisScript}" do-opcodes + "{ThisScript}" do-gas Else If "{BuildTarget}" =~ /all-gcc/ - "{thisscript}" all-gas - "{thisscript}" do-gcc + "{ThisScript}" all-gas + "{ThisScript}" all-binutils + "{ThisScript}" do-gcc Else If "{BuildTarget}" =~ /all-gdb/ - "{thisscript}" do-libiberty - "{thisscript}" do-bfd - "{thisscript}" do-opcodes - "{thisscript}" do-gdb + "{ThisScript}" do-libiberty + "{ThisScript}" do-bfd + "{ThisScript}" do-opcodes + "{ThisScript}" do-gdb Else If "{BuildTarget}" =~ /all-ld/ - "{thisscript}" do-libiberty - "{thisscript}" do-bfd - "{thisscript}" do-opcodes - "{thisscript}" do-ld + "{ThisScript}" do-libiberty + "{ThisScript}" do-bfd + "{ThisScript}" do-opcodes + "{ThisScript}" do-ld Else If "{BuildTarget}" =~ /do-bfd/ SetDirectory :bfd: - BuildProgram all + ::mpw-build all Else If "{BuildTarget}" =~ /do-libiberty/ SetDirectory :libiberty: - BuildProgram all -Else If "{BuildTarget}" =~ /do-mmalloc/ - SetDirectory :mmalloc: - BuildProgram all + ::mpw-build all Else If "{BuildTarget}" =~ /do-opcodes/ SetDirectory :opcodes: - BuildProgram all -Else If "{BuildTarget}" =~ /do-readline/ - SetDirectory :readline: - BuildProgram all + ::mpw-build all Else If "{BuildTarget}" =~ /do-binutils/ SetDirectory :binutils: - BuildProgram all + ::mpw-build all Else If "{BuildTarget}" =~ /do-gas/ SetDirectory :gas: - :mpw-build all --prefix "{prefix}" + ::mpw-build all Else If "{BuildTarget}" =~ /do-gcc/ SetDirectory :gcc: - :mpw-build all --prefix "{prefix}" + ::mpw-build all Else If "{BuildTarget}" =~ /do-gdb/ SetDirectory :gdb: - BuildProgram all + ::mpw-build all Else If "{BuildTarget}" =~ /do-ld/ SetDirectory :ld: - BuildProgram all + ::mpw-build all Else If "{BuildTarget}" =~ /install/ - "{thisscript}" install-binutils - "{thisscript}" install-gas - "{thisscript}" install-gcc - "{thisscript}" install-gdb - "{thisscript}" install-ld + "{ThisScript}" install-binutils + "{ThisScript}" install-gas + "{ThisScript}" install-gcc +# "{ThisScript}" install-gdb + "{ThisScript}" install-ld Else If "{BuildTarget}" =~ /install-binutils/ SetDirectory :binutils: - :mpw-build install --prefix "{prefix}" + ::mpw-build install Else If "{BuildTarget}" =~ /install-gas/ SetDirectory :gas: - :mpw-build install --prefix "{prefix}" + ::mpw-build install Else If "{BuildTarget}" =~ /install-gcc/ SetDirectory :gcc: - :mpw-build install --prefix "{prefix}" + ::mpw-build install Else If "{BuildTarget}" =~ /install-gdb/ SetDirectory :gdb: - :mpw-build install --prefix "{prefix}" + ::mpw-build install Else If "{BuildTarget}" =~ /install-ld/ SetDirectory :ld: - :mpw-build install --prefix "{prefix}" + ::mpw-build install Else End If diff --git a/mpw-config.in b/mpw-config.in index c6f23b348d1..534644e61a8 100644 --- a/mpw-config.in +++ b/mpw-config.in @@ -1,6 +1,6 @@ # Configuration fragment for Cygnus source tree. -Set host_libs "mmalloc libiberty opcodes bfd readline" +Set host_libs "libiberty opcodes bfd readline" Set host_tools "byacc flex binutils ld gas gcc gdb" diff --git a/mpw-configure b/mpw-configure index 2875247f9bf..ddac26e65cd 100644 --- a/mpw-configure +++ b/mpw-configure @@ -6,7 +6,7 @@ Set savedir "`Directory`" #Set Echo 1 -Set thisscript "{0}" +Set ThisScript "{0}" Set srcroot "--------" @@ -14,10 +14,14 @@ Set srcdir ":" Set objdir ":" +Set prefix ":" + Set hostalias "m68k-apple-mpw" Set targetalias {hostalias} +Set prefix "{Boot}"Cygnus:latest: + Set verify 0 Set verifystr "" @@ -80,14 +84,32 @@ If "`Exists "{srcdir}"mpw-make.in`" != "" Echo "srcroot = " {srcroot} >> "{objdir}"Makefile.tem Echo "topsrcdir = " {srcroot} >> "{objdir}"Makefile.tem Echo "srcdir = " {srcdir} >> "{objdir}"Makefile.tem + Echo "mpw_prefix = " {prefix} >> "{objdir}"Makefile.tem Echo "target_canonical = " {target_canonical} >> "{objdir}"Makefile.tem Echo "mdname = " {mdname} >> "{objdir}"Makefile.tem Echo "EMUL = " {emulname} >> "{objdir}"Makefile.tem + Echo "ARCHDEFS = -d" {archname} >> "{objdir}"Makefile.tem + If "{tdepfiles}" != "" + Echo "TDEPFILES = " {tdepfiles} >> "{objdir}"Makefile.tem + End If + If "{tm_file}" != "" + Echo "TM_FILE = " {tm_file} >> "{objdir}"Makefile.tem + End If + If "{xdepfiles}" != "" + Echo "XDEPFILES = " {xdepfiles} >> "{objdir}"Makefile.tem + End If + If "{xm_file}" != "" + Echo "XM_FILE = " {xm_file} >> "{objdir}"Makefile.tem + End If + If "{nat_file}" != "" + Echo "NAT_FILE = " {nat_file} >> "{objdir}"Makefile.tem + End If Echo "host_makefile_frag = " >> "{objdir}"Makefile.tem Echo "target_makefile_frag = " >> "{objdir}"Makefile.tem mpw-7to8 "{srcroot}"config:mpw-mh-mpw >>"{objdir}"Makefile.tem mpw-7to8 "{srcdir}"mpw-make.in >>"{objdir}"Makefile.tem - MoveIfChange "{objdir}"Makefile.tem "{objdir}"Makefile + mpw-edit-prefix "{objdir}"Makefile.tem >"{objdir}"Makefile.tem2 + MoveIfChange "{objdir}"Makefile.tem2 "{objdir}"Makefile If {verify} == 1 Echo Created Makefile in "`Directory`" End If @@ -97,11 +119,14 @@ If "`Exists "{srcdir}"mpw-build.in`" != "" Echo "Set srcroot " {srcroot} > "{objdir}"mpw-build.tem Echo "Set srcdir " {srcdir} >> "{objdir}"mpw-build.tem Echo "Set target_canonical " {target_canonical} >> "{objdir}"mpw-build.tem + Echo "Set prefix " {prefix} >> "{objdir}"mpw-build.tem mpw-7to8 "{srcdir}"mpw-build.in >>"{objdir}"mpw-build.tem MoveIfChange "{objdir}"mpw-build.tem "{objdir}"mpw-build If {verify} == 1 Echo Created mpw-build in "`Directory`" End If +Else + Echo '::mpw-build {1}' >"{objdir}"mpw-build End If For subdir In {configdirs} @@ -117,7 +142,7 @@ For subdir In {configdirs} NewFolder "{objdir}{subdir}" End If SetDirectory "{objdir}{subdir}:" - "{thisscript}" --target "{target_canonical}" --srcdir "{srcdir}{subdir}:" --srcroot "{srcroot}" {verifystr} + "{ThisScript}" --target "{target_canonical}" --srcdir "{srcdir}{subdir}:" --srcroot "{srcroot}" --prefix "{prefix}" {verifystr} SetDirectory "{savedir}" End For -- 2.30.2