From e816c16483856c96b11d1ed62cbe3c2adbdb6400 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 10 Apr 2001 19:31:13 +0000 Subject: [PATCH] Another pass on getting scmutils right. --- v7/dist/make-dist-files | 151 +++++++++++++++++++++++++--------------- 1 file changed, 96 insertions(+), 55 deletions(-) diff --git a/v7/dist/make-dist-files b/v7/dist/make-dist-files index 57b8ae82f..819b2e293 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.18 2001/04/06 20:58:43 cph Exp $ +# $Id: make-dist-files,v 1.19 2001/04/10 19:31:13 cph Exp $ # # Copyright (c) 2000-2001 Massachusetts Institute of Technology # @@ -54,6 +54,12 @@ IMAGE_DIR="${BUILD_DIR}-image" BINDIR="${IMAGE_DIR}/usr/local/bin" AUXDIR="${IMAGE_DIR}/usr/local/lib/mit-scheme" +MECH_SOURCE="/sw/scmutils" +MECH_BUILD="${BUILD_DIR}/scmutils" +MECH_IMAGE="${IMAGE_DIR}/usr/local/scmutils" +STAMP_BUILD_MECH="${TL_DIR}/stamp-build-mech" +STAMP_IMAGE_MECH="${TL_DIR}/stamp-image-mech" + if [ ! -f "${SRC_FILE}" ]; then echo "No source file: ${SRC_FILE}." exit 1 @@ -135,70 +141,105 @@ if [ ! -f "${STAMP_IMAGE}" ]; then ;; esac - # - # Scmutils - # - if [ "${TYPE}" = "scmutils" ]; then - MECH_SOURCE="/sw/scmutils" - MECH_DEST="${IMAGE_DIR}/usr/local/scmutils" - ${MKINSTALLDIRS} "${MECH_DEST}" - - for DIR in $(cd ${MECH_SOURCE};find src -type d -print); do - ${MKINSTALLDIRS} "${MECH_DEST}/${DIR}" - for FILE in ${MECH_SOURCE}/${DIR}/*.doc; do - [ -f ${FILE} ] \ - && ${INSTALL_DATA} "${FILE}" "${MECH_DEST}/${DIR}/." - done - for SUFFIX in scm c; do - for FILE in ${MECH_SOURCE}/${DIR}/*.${SUFFIX}; do - if [ -f "${FILE}" ]; then - TFILE="${MECH_DEST}/${DIR}/$(basename "${FILE}")" - rm -f "${TFILE}" - cat "${DIST_DIR}/copyright.${SUFFIX}" "${FILE}" \ - > "${TFILE}" - chtime "${FILE}" "${TFILE}" - fi - done - done + find "${IMAGE_DIR}" -type f -print | xargs chmod og-w + find "${IMAGE_DIR}" -type d -print | xargs chmod og-w + + touch "${STAMP_IMAGE}" +fi + +if [ "${TYPE}" = "scmutils" ] && [ ! -f "${STAMP_BUILD_MECH}" ];then + rm -rf "${MECH_BUILD}" + cpx -qsE "${MECH_SOURCE}/src" "${MECH_BUILD}" + ( + cd "${MECH_BUILD}" + "${BUILD_DIR}/src/microcode/scheme" \ + -library "${BUILD_DIR}/src/lib" -compiler -heap 4000 < "${TFILE}" + chtime "${FILE}" "${TFILE}" + fi done done - rm -rf "${MECH_DEST}/linux/commentary" + done + ${INSTALL_DATA} "${MECH_SOURCE}/src/copyrigh" "${MECH_IMAGE}/src/LICENSE" + ${INSTALL_DATA} "/scheme/v7/src/COPYING" "${MECH_IMAGE}/src/." + ${INSTALL_DATA} "${MECH_SOURCE}/src/general/binio/transcript" \ + "${MECH_IMAGE}/src/general/binio/." + ( + cd "${MECH_SOURCE}/src/c-utils" + for FILE in Makefile standard-map-ic.*;do + [ -f "${FILE}" ] \ + && ${INSTALL_DATA} "${FILE}" "${MECH_IMAGE}/src/c-utils/." + done + ) - ${INSTALL_DATA} "${MECH_SOURCE}/dist/edwin-mechanics.com" \ - "${MECH_DEST}/linux/." - ln -s "../../scmutils/linux/edwin-mechanics.com" "${AUXDIR}/." - ${INSTALL_DATA} ${MECH_SOURCE}/linux/c-utils/* \ - "${MECH_DEST}/linux/c-utils/." + for DIR in $(cd ${MECH_BUILD};find * -type d -print); do + ${MKINSTALLDIRS} "${MECH_IMAGE}/linux/${DIR}" + for FILE in ${MECH_BUILD}/${DIR}/*.bci; do + [ -f "${FILE}" ] \ + && ${INSTALL_DATA} "${FILE}" "${MECH_IMAGE}/linux/${DIR}/." + done + done + + for FILE in psraster texfigure texfigure-big xplot; do + ${INSTALL_DATA} "${MECH_BUILD}/c-utils/${FILE}" \ + "${MECH_IMAGE}/linux/c-utils/." + done + for FILE in standard-map-ic.ps standard-map-ic.tex; do + ${INSTALL_DATA} "${MECH_SOURCE}/src/c-utils/${FILE}" \ + "${MECH_IMAGE}/linux/c-utils/." + done - ${MKINSTALLDIRS} "${MECH_DEST}/manual" - ${INSTALL_DATA} "${MECH_SOURCE}/manual/refman.txt" \ - "${MECH_DEST}/manual/." + ${MKINSTALLDIRS} "${MECH_IMAGE}/manual" + for FILE in beginner.txt graphing.txt refman.txt; do + ${INSTALL_DATA} "${MECH_SOURCE}/manual/${FILE}" \ + "${MECH_IMAGE}/manual/." + done - ${INSTALL} "${MECH_SOURCE}/dist/mechanics" "${BINDIR}/." - ${INSTALL} "${MECH_SOURCE}/dist/edwin" "${BINDIR}/." - fi + for FILE in $(cat "${MECH_SOURCE}/dist/dist-exclude"); do + rm -rf "${MECH_IMAGE}/${FILE}" + done - # - # Adjust permissions - # find ${IMAGE_DIR} -type f -print | xargs chmod og-w find ${IMAGE_DIR} -type d -print | xargs chmod og-w - touch "${STAMP_IMAGE}" + touch "${STAMP_IMAGE_MECH}" fi if [ "${TYPE}" != "scmutils" ]; then -- 2.25.1