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.
This commit is contained in:
parent
f29351d98b
commit
5db7ecb785
5 changed files with 309 additions and 1 deletions
40
.Sanitize
40
.Sanitize
|
@ -1,6 +1,6 @@
|
|||
# .Sanitize for devo.
|
||||
|
||||
# Each directory to survive it's way into a release will need a file
|
||||
# Each directory to survive its way into a release will need a file
|
||||
# like this one called "./.Sanitize". All keyword lines must exist,
|
||||
# and must exist in the order specified by this file. Each directory
|
||||
# in the tree will be processed, top down, in the following order.
|
||||
|
@ -21,6 +21,11 @@ else
|
|||
lose_these_too="${lose_these_too} release release-info build-all.mk"
|
||||
fi
|
||||
|
||||
if ( echo $* | grep keep\-mpw > /dev/null) ; then
|
||||
keep_these_too="mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw ${keep_these_too}"
|
||||
else
|
||||
lose_these_too="mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw ${lose_these_too}"
|
||||
fi
|
||||
|
||||
# All files listed between the "Things-to-keep:" line and the
|
||||
# "Do-last:" line will be kept. All other files will be removed.
|
||||
|
@ -177,6 +182,39 @@ else
|
|||
done
|
||||
fi
|
||||
|
||||
if [ -n "${verbose}" ] ; then
|
||||
echo Removing traces of \"mpw\"...
|
||||
fi
|
||||
|
||||
# Don't try to clean directories here, as the 'mv' command will fail.
|
||||
# Also, grep fails on NFS mounted directories.
|
||||
if ( echo $* | grep keep\-mpw > /dev/null ) ; then
|
||||
for i in * ; do
|
||||
if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
|
||||
if [ -n "${verbose}" ] ; then
|
||||
echo Keeping mpw stuff in $i
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
for i in * ; do
|
||||
if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
|
||||
if [ -n "${verbose}" ] ; then
|
||||
echo Removing traces of \"mpw\" from $i...
|
||||
fi
|
||||
cp $i new
|
||||
sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
|
||||
if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
|
||||
if [ -n "${verbose}" ] ; then
|
||||
echo Caching $i in .Recover...
|
||||
fi
|
||||
mv $i .Recover
|
||||
fi
|
||||
mv new $i
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for i in * ; do
|
||||
if test ! -d $i && (grep sanitize $i > /dev/null) ; then
|
||||
echo '***' Some mentions of Sanitize are still left in $i! 1>&2
|
||||
|
|
7
ChangeLog.mpw
Normal file
7
ChangeLog.mpw
Normal file
|
@ -0,0 +1,7 @@
|
|||
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.
|
||||
|
||||
|
130
mpw-build.in
Normal file
130
mpw-build.in
Normal file
|
@ -0,0 +1,130 @@
|
|||
# Top-level script fragment to build everything for MPW.
|
||||
|
||||
Set savedir "`Directory`"
|
||||
|
||||
#Set Echo 1
|
||||
|
||||
Set thisscript "{0}"
|
||||
|
||||
Set topsrcdir ":"
|
||||
|
||||
Set srcdir ":"
|
||||
|
||||
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
|
||||
Else If "{BuildTarget}" =~ /all-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
|
||||
Else If "{BuildTarget}" =~ /all-gcc/
|
||||
"{thisscript}" all-gas
|
||||
"{thisscript}" do-gcc
|
||||
Else If "{BuildTarget}" =~ /all-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
|
||||
Else If "{BuildTarget}" =~ /do-bfd/
|
||||
SetDirectory :bfd:
|
||||
BuildProgram all
|
||||
Else If "{BuildTarget}" =~ /do-libiberty/
|
||||
SetDirectory :libiberty:
|
||||
BuildProgram all
|
||||
Else If "{BuildTarget}" =~ /do-mmalloc/
|
||||
SetDirectory :mmalloc:
|
||||
BuildProgram all
|
||||
Else If "{BuildTarget}" =~ /do-opcodes/
|
||||
SetDirectory :opcodes:
|
||||
BuildProgram all
|
||||
Else If "{BuildTarget}" =~ /do-readline/
|
||||
SetDirectory :readline:
|
||||
BuildProgram all
|
||||
Else If "{BuildTarget}" =~ /do-binutils/
|
||||
SetDirectory :binutils:
|
||||
BuildProgram all
|
||||
Else If "{BuildTarget}" =~ /do-gas/
|
||||
SetDirectory :gas:
|
||||
:mpw-build all --prefix "{prefix}"
|
||||
Else If "{BuildTarget}" =~ /do-gcc/
|
||||
SetDirectory :gcc:
|
||||
:mpw-build all --prefix "{prefix}"
|
||||
Else If "{BuildTarget}" =~ /do-gdb/
|
||||
SetDirectory :gdb:
|
||||
BuildProgram all
|
||||
Else If "{BuildTarget}" =~ /do-ld/
|
||||
SetDirectory :ld:
|
||||
BuildProgram all
|
||||
Else If "{BuildTarget}" =~ /install/
|
||||
"{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}"
|
||||
Else If "{BuildTarget}" =~ /install-gas/
|
||||
SetDirectory :gas:
|
||||
:mpw-build install --prefix "{prefix}"
|
||||
Else If "{BuildTarget}" =~ /install-gcc/
|
||||
SetDirectory :gcc:
|
||||
:mpw-build install --prefix "{prefix}"
|
||||
Else If "{BuildTarget}" =~ /install-gdb/
|
||||
SetDirectory :gdb:
|
||||
:mpw-build install --prefix "{prefix}"
|
||||
Else If "{BuildTarget}" =~ /install-ld/
|
||||
SetDirectory :ld:
|
||||
:mpw-build install --prefix "{prefix}"
|
||||
Else
|
||||
End If
|
||||
|
||||
SetDirectory "{savedir}"
|
11
mpw-config.in
Normal file
11
mpw-config.in
Normal file
|
@ -0,0 +1,11 @@
|
|||
Set host_libs "mmalloc libiberty opcodes bfd readline"
|
||||
|
||||
Set host_tools "byacc flex binutils ld gas gcc gdb"
|
||||
|
||||
Set target_libs ""
|
||||
|
||||
Set target_tools ""
|
||||
|
||||
Set configdirs "{host_libs} {host_tools} {target_libs} {target_tools}"
|
||||
Export configdirs
|
||||
|
122
mpw-configure
Normal file
122
mpw-configure
Normal file
|
@ -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}"
|
Loading…
Reference in a new issue