esac
DIST_DIR=mit-scheme-${RELEASE}
-LIARC_DIST_DIR=mit-scheme-c-${RELEASE}
+LIARC32_DIST_DIR=mit-scheme-c32-${RELEASE}
+LIARC64_DIST_DIR=mit-scheme-c64-${RELEASE}
OUTPUT_DIR=.out
# Set up trap to clean up any temporary files.
cleanup ()
{
cd "${CLEANUP_BASE}"
- rm -rf "${DIST_DIR}" "${LIARC_DIST_DIR}"
+ rm -rf "${DIST_DIR}" "${LIARC32_DIST_DIR}" "${LIARC64_DIST_DIR}"
}
trap cleanup EXIT SIGINT SIGQUIT SIGTERM
cleanup
# Make sure permissions are reasonable.
find "${DIST_DIR}" -exec chmod go-w '{}' \;
-# Now make the liarc dist directory.
-echo "Creating the liarc distribution directory"
-cp -pR "${DIST_DIR}" "${LIARC_DIST_DIR}"
+# Now make the liarc dist directories.
+echo "Creating the liarc distribution directories"
+cp -pR "${DIST_DIR}" "${LIARC32_DIST_DIR}"
+cp -pR "${DIST_DIR}" "${LIARC64_DIST_DIR}"
# The liarc dist requires additional setup.
-echo "Compiling the liarc bootstrap files"
-(cd "${LIARC_DIST_DIR}"/src; etc/make-liarc-dist.sh) \
- > "${OUTPUT_DIR}"/liarc-compile 2>&1
+
+compile_liarc_bootstrap ()
+{
+ (
+ cd "${1}"/src
+ MIT_SCHEME_EXE=${2} etc/make-liarc-dist.sh
+ ) > "${OUTPUT_DIR}"/"${3}" 2>&1
+}
+
+echo "Compiling the liarc32 bootstrap files"
+compile_liarc_bootstrap "${LIARC32_DIST_DIR}" mit-scheme-i386 liarc32-compile
+
+echo "Compiling the liarc64 bootstrap files"
+compile_liarc_bootstrap "${LIARC64_DIST_DIR}" mit-scheme-x86-64 liarc64-compile
# OK, we've built the directories, time to build the output files.
echo "Building distribution archive files"
TAR_FILE=${DIST_DIR}.tar.gz
-LIARC_FILE=${LIARC_DIST_DIR}.tar.gz
+LIARC32_FILE=${LIARC32_DIST_DIR}.tar.gz
+LIARC64_FILE=${LIARC64_DIST_DIR}.tar.gz
ZIP_FILE=${DIST_DIR}.zip
UCODE_FILE=${DIST_DIR}-ucode.tar.gz
CHANGELOG=changelog.txt
-OUTPUTS=("${TAR_FILE}" "${LIARC_FILE}" "${ZIP_FILE}" "${UCODE_FILE}" \
- "${CHANGELOG}")
+OUTPUTS=("${TAR_FILE}" "${LIARC32_FILE}" "${LIARC64_FILE}" "${ZIP_FILE}" \
+ "${UCODE_FILE}" "${CHANGELOG}")
rm -f "${OUTPUTS[@]}"
tar czf "${TAR_FILE}" "${DIST_DIR}"
-tar czf "${LIARC_FILE}" "${LIARC_DIST_DIR}"
+tar czf "${LIARC32_FILE}" "${LIARC32_DIST_DIR}"
+tar czf "${LIARC64_FILE}" "${LIARC64_DIST_DIR}"
tar czf "${UCODE_FILE}" "${DIST_DIR}"/src/COPYING "${DIST_DIR}"/src/microcode
cp -p "${DIST_DIR}"/LOG "${CHANGELOG}"