fi
if [ "${destination}" = "" ]
then
- destination="gnulinux-${type}-`date +%Y%m%d`"
+ destination="`/scheme/v7/dist/release-prefix`-ix86-gnu-linux"
fi
case "${type}" in
;;
esac
-if [ -d ${destination} ]
-then
- echo "DESTINATION must not be an existing directory"
- exit 1
-fi
-
bands="runtime.com compiler.com edwin.com all.com"
case ${type} in
6001)
run_opts="optiondb numint cpress format gdbm hashtb ordvec rbtree ystep process syncproc wttree rgxcmp chrsyn regexp krypt"
ed_opts="techinfo telnet midas pasmod tximod manual print sort eystep nntp snr verilog vhdl webster pwedit pwparse"
-mkdir ${destination}
-mkdir ${destination}/bin
-mkdir ${destination}/lib
-mkdir ${destination}/lib/mit-scheme
-mkdir ${destination}/lib/mit-scheme/SRC
+build_dir="build-$$"
+rm -rf ${build_dir}
+mkdir ${build_dir}
+mkdir ${build_dir}/bin
+mkdir ${build_dir}/lib
+mkdir ${build_dir}/lib/mit-scheme
+mkdir ${build_dir}/lib/mit-scheme/SRC
for file in scheme bchscheme
do
- cpx -v /scheme/v7/linux/microcode/${file} ${destination}/bin/.
+ cpx -v /scheme/v7/linux/microcode/${file} ${build_dir}/bin/.
done
for file in utabmd.bin ${bands}
do
- cpx -v /scheme/v7/linux/lib/${file} ${destination}/lib/mit-scheme/.
+ cpx -v /scheme/v7/linux/lib/${file} ${build_dir}/lib/mit-scheme/.
done
-cpx -v /scheme/v7/dist/optiondb.scm ${destination}/lib/mit-scheme/.
+cpx -v /scheme/v7/dist/optiondb.scm ${build_dir}/lib/mit-scheme/.
#
# Edwin
#
-mkdir ${destination}/lib/mit-scheme/edwin
+mkdir ${build_dir}/lib/mit-scheme/edwin
for file in info etc
do
- cpx -rv /scheme/v7/linux/lib/edwin/${file} ${destination}/lib/mit-scheme/edwin/.
+ cpx -rv /scheme/v7/linux/lib/edwin/${file} ${build_dir}/lib/mit-scheme/edwin/.
done
#
else
rundbg=/scheme/v7/linux/runtime
fi
-mkdir ${destination}/lib/mit-scheme/SRC/runtime
-ln -s SRC/runtime ${destination}/lib/mit-scheme/options
+mkdir ${build_dir}/lib/mit-scheme/SRC/runtime
+ln -s SRC/runtime ${build_dir}/lib/mit-scheme/options
for file in ${run_opts}
do
- cpx -v ${rundbg}/${file}.com ${destination}/lib/mit-scheme/SRC/runtime/.
+ cpx -v ${rundbg}/${file}.com ${build_dir}/lib/mit-scheme/SRC/runtime/.
done
-cpx -v ${rundbg}/*.bci ${destination}/lib/mit-scheme/SRC/runtime/.
+cpx -v ${rundbg}/*.bci ${build_dir}/lib/mit-scheme/SRC/runtime/.
#
# Edwin debugging info and autoloads.
#
-mkdir ${destination}/lib/mit-scheme/SRC/edwin
-ln -s ../SRC/edwin ${destination}/lib/mit-scheme/edwin/autoload
+mkdir ${build_dir}/lib/mit-scheme/SRC/edwin
+ln -s ../SRC/edwin ${build_dir}/lib/mit-scheme/edwin/autoload
for file in ${ed_opts}
do
- cpx -v /scheme/v7/linux/edwin/${file}.com ${destination}/lib/mit-scheme/SRC/edwin/.
+ cpx -v /scheme/v7/linux/edwin/${file}.com ${build_dir}/lib/mit-scheme/SRC/edwin/.
done
-cpx -v /scheme/v7/linux/edwin/*.bci ${destination}/lib/mit-scheme/SRC/edwin/.
+cpx -v /scheme/v7/linux/edwin/*.bci ${build_dir}/lib/mit-scheme/SRC/edwin/.
#
# SOS
#
-mkdir ${destination}/lib/mit-scheme/sos
-cpx -v /scheme/v7/linux/sos/*.com ${destination}/lib/mit-scheme/sos/.
-cpx -v /scheme/v7/linux/sos/*.bci ${destination}/lib/mit-scheme/sos/.
-cpx -v /scheme/v7/linux/sos/sos.bco ${destination}/lib/mit-scheme/sos/.
-cpx -v /scheme/v7/linux/sos/sos.bld ${destination}/lib/mit-scheme/sos/.
-cpx -vh /scheme/v7/linux/sos/load.scm ${destination}/lib/mit-scheme/sos/.
+mkdir ${build_dir}/lib/mit-scheme/sos
+cpx -v /scheme/v7/linux/sos/*.com ${build_dir}/lib/mit-scheme/sos/.
+cpx -v /scheme/v7/linux/sos/*.bci ${build_dir}/lib/mit-scheme/sos/.
+cpx -v /scheme/v7/linux/sos/sos.bco ${build_dir}/lib/mit-scheme/sos/.
+cpx -v /scheme/v7/linux/sos/sos.bld ${build_dir}/lib/mit-scheme/sos/.
+cpx -vh /scheme/v7/linux/sos/load.scm ${build_dir}/lib/mit-scheme/sos/.
#
# Documentation
#
-mkdir ${destination}/lib/mit-scheme/documentation
-cpx -v /scheme/v7/src/COPYING ${destination}/lib/mit-scheme/documentation/.
-cpx -v /scheme/v7/dist/index.html ${destination}/lib/mit-scheme/documentation/.
-cpx -v /scheme/documentation/ref-manual/html/*.html ${destination}/lib/mit-scheme/documentation/.
-cpx -v /scheme/documentation/user-manual/html/*.html ${destination}/lib/mit-scheme/documentation/.
-cpx -v /scheme/documentation/sos/html/*.html ${destination}/lib/mit-scheme/documentation/.
+doc_dir=${build_dir}/lib/mit-scheme/doc
+mkdir ${doc_dir}
+cpx -v /scheme/v7/src/COPYING ${doc_dir}
+cpx -v /scheme/v7/dist/index.html ${doc_dir}
+cpx -v /scheme/documentation/ref-manual/html/*.html ${doc_dir}
+cpx -v /scheme/documentation/user-manual/html/*.html ${doc_dir}
+cpx -v /scheme/documentation/sos/html/*.html ${doc_dir}
#
# Scmutils
if [ ${type} = scmutils ]
then
mech_source=/sw/scmutils
- mech_dest=${destination}/scmutils
+ mech_dest=${build_dir}/scmutils
mkdir ${mech_dest}
for dir in `cd ${mech_source};find src -type d -print`
done
rm -rf ${mech_dest}/linux/commentary
cpx -v ${mech_source}/dist/edwin-mechanics.com ${mech_dest}/linux/.
- ln -s ../../scmutils/linux/edwin-mechanics.com ${destination}/lib/mit-scheme/.
+ ln -s ../../scmutils/linux/edwin-mechanics.com ${build_dir}/lib/mit-scheme/.
cpx -v ${mech_source}/linux/c-utils/* ${mech_dest}/linux/c-utils/.
mkdir ${mech_dest}/manual
cpx -v ${mech_source}/manual/refman.txt ${mech_dest}/manual/.
- cpx -v ${mech_source}/dist/mechanics ${destination}/bin/.
- cpx -v ${mech_source}/dist/edwin ${destination}/bin/.
+ cpx -v ${mech_source}/dist/mechanics ${build_dir}/bin/.
+ cpx -v ${mech_source}/dist/edwin ${build_dir}/bin/.
fi
#
# Adjust permissions
#
-find ${destination} -type f -print | xargs chmod a-w
-find ${destination} -type d -print | xargs chmod og-w
+find ${build_dir} -type f -print | xargs chmod a-w
+find ${build_dir} -type d -print | xargs chmod og-w
tarfile=${destination}.tar.gz
-if [ -f ${tarfile} ]
-then
- rm -f ${tarfile}
-fi
-(cd ${destination}; tar cvzf ../${tarfile} *)
+rm -f ${tarfile}
+(cd ${build_dir}; tar cvzf ../${tarfile} *)
chmod 444 ${tarfile}
-rm -rf ${destination}
+rm -rf ${build_dir}