my_make
}
-make_image ()
-{
- local IMAGE_DIR=${TL_DIR}/${1}
- my_make install DESTDIR="${IMAGE_DIR}"
- my_mv "${IMAGE_DIR}"/usr/local/* "${IMAGE_DIR}"/.
- my_rmdir "${IMAGE_DIR}"/usr/local
- my_rmdir "${IMAGE_DIR}"/usr
-}
-
-remove_unshipped_files ()
-{
- local IMAGE_DIR=${1}
- local LIB_DIR=${IMAGE_DIR}/lib/mit-scheme-${2}
- my_rm_rf "${IMAGE_DIR}"/bin "${LIB_DIR}"/lib
- my_rm_f "${LIB_DIR}"/runtime.com "${LIB_DIR}"/macosx-starter
-}
-
for ARCH in i386 x86-64; do
- IMAGE_DIR=${DIST_DIR}-${ARCH}
OUT_ROOT=${NATIVE_OUT}-${ARCH}
notify "Building binaries for arch ${ARCH}"
unpack_dist_file_to "${DIST_DIR}" "${DIST_DIR}"
run_command "${OUT_ROOT}"-compile "${DIST_DIR}"/src build "${ARCH}"
+ run_command "${OUT_ROOT}"-clean "${DIST_DIR}"/src/microcode make distclean
+ my_rm_f "${DIST_DIR}"/src/lib/runtime.com
- notify "Making image for arch ${ARCH}"
- new_temp_dir "${IMAGE_DIR}"
- run_command "${OUT_ROOT}"-image "${DIST_DIR}"/src make_image "${IMAGE_DIR}"
- remove_unshipped_files "${IMAGE_DIR}" "${ARCH}"
- unpack_into_existing_dir "${DOC_IMAGE_DIR}" \
- "${IMAGE_DIR}"/lib/mit-scheme-"${ARCH}"
- fixup_perms "${IMAGE_DIR}"
- make_tar_file "${OUT_ROOT}" "${IMAGE_DIR}"
+ notify "Making tarball"
+ fixup_perms "${DIST_DIR}"
+ make_tar_file "${OUT_ROOT}" "${DIST_DIR}"-"${ARCH}" "${DIST_DIR}"
cleanup_temp_files
done
We will use as an example the installation for GNU/Linux. The
installation for other unix systems is similar. There are several
references to @var{ARCH} below; these refer to the computer
-architecture that Scheme is compiled for, such as @samp{i386} or
+architecture that Scheme is compiled for, either @samp{i386} or
@samp{x86-64}.
MIT/GNU Scheme is distributed as a compressed `tar' file. The tar
-file contains two directories, called @file{bin} and @file{lib}. The
-@file{bin} directory contains one executable file, called
-@command{mit-scheme-@var{ARCH}}, and some symlinks for convenience and
-backwards compatibility. The @file{lib} directory contains one
-subdirectory, @file{lib/mit-scheme-@var{ARCH}}, that Scheme uses while
-it is executing.
-
-The goal of the installation is to put the executable files in a
-directory where they will be executed as commands, and to put the
-library files in some convenient place where Scheme can find them.
-
-There are two ways to install this software: the conventional way in
-@file{/usr/local}, and the alternative way, in locations of your
-choice. We encourage you to install this software in @file{/usr/local}
-if possible.
-
-To install the software in @file{/usr/local}, execute the following
-commands, substituting for @var{version} the version of Scheme you wish
-to install, or the date of the snapshot if you are installing a
-snapshot, and for @var{platform} the platform you are on, such as
-@samp{ix86-gnu-linux} or @samp{ix86-apple-darwin}:
+file contains both source and binary files; the binary files are
+pre-compiled Scheme code for a particular computer architecture.
+
+In order to install the software, it's necessary to configure and
+compile the C code, then to install the combined C and Scheme
+binaries. This is done in the following steps:
+
+@enumerate
+@item
+Unpack the tar file,
+@file{mit-scheme-@var{VERSION}-@var{ARCH}.tar.gz}, into the directory
+@file{mit-scheme-@var{VERSION}}. For example,
@example
-cd /usr/local
-rm -f bin/scheme bin/bchscheme bin/mit-scheme*
-rm -rf lib/mit-scheme*
-tar xzf mit-scheme-@var{version}-@var{platform}.tar.gz
+tar xzf mit-scheme-9.0-i386.tar.gz
@end example
-@noindent
-After executing these commands, the executable files will be in
-@file{/usr/local/bin}, and the library files will be in
-@file{/usr/local/lib/mit-scheme-@var{ARCH}}. No further configuration
-is required.
-
-To install the files in directories of your choice:
+will create a new directory @file{mit-scheme-9.0}.
-@itemize @bullet
@item
-First unpack the distribution:
+Move into the new directory:
@example
-mkdir temp
-cd temp
-tar xzf mit-scheme-@var{version}-@var{platform}.tar.gz
+cd mit-scheme-@var{VERSION}/src
@end example
@item
-Next, move the contents of the @file{bin} directory to somewhere
-convenient that is on your execution path. For example, if you had a
-directory @file{$@{HOME@}/bin} on your path, you would do this:
+Configure the software:
@example
-mv bin/* $@{HOME@}/bin/.
+./configure
@end example
@item
-Next, move or copy the @file{lib/mit-scheme-@var{ARCH}} directory
-somewhere convenient. For example, you could move it to your home
-directory:
+Build the software:
@example
-mv lib/mit-scheme-@var{ARCH} $@{HOME@}/.
+make compile-microcode
@end example
-Note that on some unix systems, if you have unpacked the distribution
-on a different drive than the one you plan to store the
-@file{mit-scheme-@var{ARCH}} directory on, you must use the command
-@command{cp -pr} rather than @command{mv}.
-
@item
-Next, you must tell Scheme where to find the
-@file{mit-scheme-@var{ARCH}} directory. This can be done in one of
-two ways. The first way is to bind the environment variable
-@env{MITSCHEME_LIBRARY_PATH} to the full path to the directory, e.g.@:
-in a Bourne shell you would do
+Install the software:
@example
-MITSCHEME_LIBRARY_PATH=$@{HOME@}/mit-scheme
-export MITSCHEME_LIBRARY_PATH
+make install
@end example
+@end enumerate
-You should put this environment-variable binding in one of your shell
-init files, e.g.@ for @command{bash} it might go in the @file{.bashrc}
-file.
-
-The second way is to use a command-line argument when invoking Scheme,
-e.g.@:
+After installing the software, you can delete the unpacked directory:
@example
-mit-scheme --library $@{HOME@}/mit-scheme
+cd ../..
+rm -rf mit-scheme-@var{VERSION}
@end example
-@item
-You should now be able to run MIT/GNU Scheme. @xref{Running
-Scheme}, for more information.
-@end itemize
+By default, the software will be installed in @file{/usr/local}, in
+the subdirectories @file{bin} and @file{lib}. If you want it
+installed somewhere else, for example @file{/opt/mit-scheme}, pass the
+@option{--prefix} option to the configure script, as in
+@kbd{./configure --prefix=/opt/mit-scheme}.
+
+The configure script accepts all the normal arguments for such
+scripts, and additionally accepts some that are specific to MIT/GNU
+Scheme. To see all the possible arguments and their meanings, run the
+command @kbd{./configure --help}.
@node Windows Installation, , Unix Installation, Installation
@section Windows Installation