From cf43aba6ffc1f2d5999b986fc36faadfda5e7ff6 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 3 Mar 2001 05:28:05 +0000 Subject: [PATCH] Don't copy precompiled binaries to the output files. Instead unpack the source archive and build the binaries from source. This is partially necessary because we want to compile the microcode in a portable way. The locally-compiled microcode is dynamically linked to libraries that might not be available on all target systems. --- v7/dist/make-dist-files | 104 ++++++++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 40 deletions(-) diff --git a/v7/dist/make-dist-files b/v7/dist/make-dist-files index c3d955a22..af924097d 100755 --- a/v7/dist/make-dist-files +++ b/v7/dist/make-dist-files @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: make-dist-files,v 1.12 2001/02/23 05:19:03 cph Exp $ +# $Id: make-dist-files,v 1.13 2001/03/03 05:28:05 cph Exp $ # # Copyright (c) 2000-2001 Massachusetts Institute of Technology # @@ -18,6 +18,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +set -e + TYPE=$1 DESTINATION=$2 @@ -36,51 +38,73 @@ esac . /scheme/v7/dist/release-prefix -BUILD_DIR="`pwd`/build-$$" -BINDIR=${BUILD_DIR}/usr/local/bin -AUXDIR=${BUILD_DIR}/usr/local/lib/mit-scheme +SRC_FILE="$(get_release_prefix)-src.tar.gz" +if [ ! -f "${SRC_FILE}" ]; then + echo "No source file: ${SRC_FILE}." + exit 1 +fi + +BUILD_DIR="$(pwd)/$(get_release_prefix)" +IMAGE_DIR="$(pwd)/image-$$" +BINDIR="${IMAGE_DIR}/usr/local/bin" +AUXDIR="${IMAGE_DIR}/usr/local/lib/mit-scheme" MKINSTALLDIRS="/scheme/v7/src/mkinstalldirs" INSTALL="install" INSTALL_DATA="${INSTALL} -m 644" +rm -rf ${BUILD_DIR} ${IMAGE_DIR} +tar xzf "${SRC_FILE}" + +cd "${BUILD_DIR}/src" +./configure --enable-static-libs=yes --with-mcrypt=no +make +make install DESTDIR="${IMAGE_DIR}" +${MKINSTALLDIRS} "${AUXDIR}/doc/." +${INSTALL_DATA} COPYING "${AUXDIR}/doc/." + +cd "${BUILD_DIR}/doc" +./configure +make +make install-info-gz DESTDIR="${IMAGE_DIR}" \ + infodir=/usr/local/lib/mit-scheme/edwin/info +make install-html DESTDIR="${IMAGE_DIR}" + rm -rf ${BUILD_DIR} -( - cd /scheme/v7/linux - make install DESTDIR=${BUILD_DIR} -) -( - cd /scheme/v7/doc - make install-info-gz DESTDIR=${BUILD_DIR} \ - infodir=/usr/local/lib/mit-scheme/edwin/info - make install-html DESTDIR=${BUILD_DIR} -) - -${MKINSTALLDIRS} ${AUXDIR}/doc -${INSTALL_DATA} /scheme/v7/src/COPYING ${AUXDIR}/doc/. - -${INSTALL_DATA} /usr/local/info/dir ${AUXDIR}/edwin/info/. -${INSTALL_DATA} /usr/local/info/r4rs.* ${AUXDIR}/edwin/info/. -${INSTALL_DATA} /usr/local/info/r5rs.* ${AUXDIR}/edwin/info/. - -BANDS="runtime.com compiler.com edwin.com all.com 6001.com" + +${INSTALL_DATA} /usr/local/info/dir "${AUXDIR}/edwin/info/." +${INSTALL_DATA} /usr/local/info/r4rs.* "${AUXDIR}/edwin/info/." +${INSTALL_DATA} /usr/local/info/r5rs.* "${AUXDIR}/edwin/info/." + +ALL_BANDS="runtime.com compiler.com edwin.com all.com 6001.com" case ${TYPE} in std) - rm -f ${AUXDIR}/6001.com - ;; -6001) - for BAND in ${BANDS}; do - [ "${BAND}" = "6001.com" ] || rm -f ${AUXDIR}/${BAND} + for BAND in ${ALL_BANDS}; do + case "${BAND}" in + "runtime.com"|"all.com") + ;; + *) + rm -f "${AUXDIR}/${BAND}" + ;; + esac done ;; all) - for BAND in ${BANDS}; do - [ "${BAND}" = "all.com" ] || rm -f ${AUXDIR}/${BAND} + ;; +6001) + for BAND in ${ALL_BANDS}; do + case "${BAND}" in + "6001.com") + ;; + *) + rm -f "${AUXDIR}/${BAND}" + ;; + esac done ;; scmutils) - for BAND in ${BANDS}; do - rm -f ${AUXDIR}/${BAND} + for BAND in ${ALL_BANDS}; do + rm -f "${AUXDIR}/${BAND}" done ;; esac @@ -90,10 +114,10 @@ esac # if [ ${TYPE} = scmutils ]; then MECH_SOURCE=/sw/scmutils - MECH_DEST=${BUILD_DIR}/usr/local/scmutils + MECH_DEST=${IMAGE_DIR}/usr/local/scmutils ${MKINSTALLDIRS} ${MECH_DEST} - for DIR in `cd ${MECH_SOURCE};find src -type d -print`; do + for DIR in $(cd ${MECH_SOURCE};find src -type d -print); do ${MKINSTALLDIRS} ${MECH_DEST}/${DIR} for FILE in ${MECH_SOURCE}/${DIR}/*.scm \ ${MECH_SOURCE}/${DIR}/*.doc \ @@ -107,7 +131,7 @@ if [ ${TYPE} = scmutils ]; then rm -rf ${MECH_DEST}/src/commentary rm -rf ${MECH_DEST}/src/poly/zuras - for DIR in `cd ${MECH_SOURCE};find linux -type d -print`; do + for DIR in $(cd ${MECH_SOURCE};find linux -type d -print); do ${MKINSTALLDIRS} ${MECH_DEST}/${DIR} for FILE in ${MECH_SOURCE}/${DIR}/*.bci; do [ -f ${FILE} ] && ${INSTALL_DATA} ${FILE} ${MECH_DEST}/${DIR}/. @@ -129,19 +153,19 @@ fi # # Adjust permissions # -find ${BUILD_DIR} -type f -print | xargs chmod og-w -find ${BUILD_DIR} -type d -print | xargs chmod og-w +find ${IMAGE_DIR} -type f -print | xargs chmod og-w +find ${IMAGE_DIR} -type d -print | xargs chmod og-w make_tarfile () { tarfile=${1}.tar.gz rm -f ${tarfile} - (cd ${BUILD_DIR}/usr/local; tar cvzf ../../../${tarfile} *) + (cd ${IMAGE_DIR}/usr/local; tar cvzf ../../../${tarfile} *) chmod 444 ${tarfile} } if [ "${DESTINATION}" = "" ]; then - PRE="`get_release_prefix`-ix86" + PRE="$(get_release_prefix)-ix86" make_tarfile "${PRE}-gnu-linux" ${INSTALL} /scheme/v7/dist/freebsd-bin/* ${BINDIR}/. make_tarfile "${PRE}-freebsd" @@ -149,4 +173,4 @@ else make_tarfile ${DESTINATION} fi -rm -rf ${BUILD_DIR} +rm -rf ${IMAGE_DIR} -- 2.25.1