aboutsummaryrefslogtreecommitdiff
path: root/mpw-configure
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-01-15 20:46:29 +0000
committerStan Shebs <shebs@codesourcery.com>1994-01-15 20:46:29 +0000
commit5db7ecb785deaf2f6b4c0a830147d0927e078531 (patch)
treef424727a6dc06cd44a3b1c52c87de5c10ae1ff26 /mpw-configure
parentf29351d98b9834627cc9b77081d7f67fe65d9267 (diff)
downloadfsf-binutils-gdb-5db7ecb785deaf2f6b4c0a830147d0927e078531.zip
fsf-binutils-gdb-5db7ecb785deaf2f6b4c0a830147d0927e078531.tar.gz
fsf-binutils-gdb-5db7ecb785deaf2f6b4c0a830147d0927e078531.tar.bz2
Fri Jan 7 14:34:31 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-build.in: New file, top-level build script fragment for MPW. * mpw-configure: New file, configure script for MPW. * mpw-config.in: New file, config fragment for MPW.
Diffstat (limited to 'mpw-configure')
-rw-r--r--mpw-configure122
1 files changed, 122 insertions, 0 deletions
diff --git a/mpw-configure b/mpw-configure
new file mode 100644
index 0000000..706c8eb
--- /dev/null
+++ b/mpw-configure
@@ -0,0 +1,122 @@
+# Configuration script
+
+### This script (and its config.in fragments) must NOT use any 8-bit chars!
+
+Set savedir "`Directory`"
+
+#Set Echo 1
+
+Set thisscript "{0}"
+
+Set srcroot "--------"
+
+Set srcdir ":"
+
+Set objdir ":"
+
+Set hostalias "m68k-apple-mpw"
+
+Set targetalias {hostalias}
+
+Set verify 0
+Set verifystr ""
+
+# Parse arguments.
+
+Loop
+ Break If {#} == 0
+ If "{1}" =~ /--prefix/
+ Set prefix "{2}"
+ Shift 1
+ Else If "{1}" =~ /--srcdir/
+ Set srcdir "{2}"
+ Shift 1
+ Else If "{1}" =~ /--srcroot/
+ Set srcroot "{2}"
+ Shift 1
+ Else If "{1}" =~ /--target/
+ Set targetalias "{2}"
+ Shift 1
+ Else If "{1}" =~ /-v/
+ Set verify 1
+ Set verifystr "-v"
+ Shift 1
+ Else
+ Echo "{1}" is not a valid argument
+ Exit 1
+ End If
+ Shift 1
+End Loop
+
+Set Exit 0
+
+# (should interpret aliases if not in canonical form)
+
+Set target_canonical "{targetalias}"
+
+Set configdirs ""
+
+If "{srcroot}" =~ /--------/
+ Set srcroot "{srcdir}"
+End If
+If "`Exists "{srcdir}"`" == ""
+ Echo Source directory {srcdir} does not exist!
+ Exit 1
+End If
+If "`Exists "{srcroot}"`" == ""
+ Echo Top-level source directory {srcroot} does not exist!
+ Exit 1
+End If
+
+If "`Exists "{srcdir}"mpw-config.in`" != ""
+ Execute "{srcdir}"mpw-config.in
+End If
+If "`Exists "{srcdir}"mpw-xconfig.in`" != ""
+ Execute "{srcdir}"mpw-xconfig.in
+End If
+
+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 "target_canonical = " {target_canonical} >> "{objdir}"Makefile.tem
+ Echo "mdname = " {mdname} >> "{objdir}"Makefile.tem
+ mpw-7to8 "{srcdir}"mpw-make.in >>"{objdir}"Makefile.tem
+ MoveIfChange "{objdir}"Makefile.tem "{objdir}"Makefile
+ If {verify} == 1
+ Echo Created Makefile in "`Directory`"
+ End If
+End If
+
+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
+ 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
+End If
+
+For subdir In {configdirs}
+ Set savedir "`Directory`"
+ If "`Exists "{srcdir}{subdir}:"`" == ""
+ Echo Strange, no {subdir} in {srcdir}
+ Continue
+ End If
+ If {verify} == 1
+ Echo Configuring {subdir}...
+ End If
+ If "`Exists "{objdir}{subdir}:"`" == ""
+ NewFolder "{objdir}{subdir}"
+ End If
+ SetDirectory "{objdir}{subdir}:"
+ "{thisscript}" --target "{target_canonical}" --srcdir "{srcdir}{subdir}:" --srcroot "{srcroot}" {verifystr}
+ SetDirectory "{savedir}"
+End For
+
+Echo "# This directory was configured as follows:" >config.status
+Echo "mpw-configure --host {hostalias} --target {targetalias} --srcdir {srcdir}" >>config.status
+
+SetDirectory "{savedir}"