Adjust for 32- and 64-bit liarc builds.
authorChris Hanson <org/chris-hanson/cph>
Tue, 9 Feb 2010 03:18:38 +0000 (19:18 -0800)
committerChris Hanson <org/chris-hanson/cph>
Tue, 9 Feb 2010 03:18:38 +0000 (19:18 -0800)
dist/make-src-files

index 2e28ab195c24a69e51ec3b3751045b7555c1f0ed..2ba3007d774eed80077bdf13296cbdfad2e0a351 100755 (executable)
@@ -57,7 +57,8 @@ case ${TYPE} in
 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.
@@ -65,7 +66,7 @@ CLEANUP_BASE=$(pwd)
 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
@@ -92,29 +93,43 @@ find "${DIST_DIR}" -type d -name autom4te.cache | xargs rm -rf
 # 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}"