From 41cb727d8241abd87d9d231f361e91a8de9009e9 Mon Sep 17 00:00:00 2001 From: felix Date: Sat, 30 Dec 2017 14:15:03 +0100 Subject: [PATCH] Added script to automate bootstrapping and some instructions in the README --- README | 27 ++++++++++++++++++++++----- scripts/bootstrap.sh | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 5 deletions(-) create mode 100755 scripts/bootstrap.sh diff --git a/README b/README index c7ec23c..4749ac8 100644 --- a/README +++ b/README @@ -645,11 +645,28 @@ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ make PLATFORM= CHICKEN= \ boot-chicken - This will produce a statically linked binary with the name - "chicken-boot[.exe]" that can be given as the value of the - "CHICKEN" argument when invoking make(1). Note that the path - to an existing `chicken' binary must be given to use it for - compiling the Scheme code of the runtime-system and compiler. + This will produce a statically linked binary with the name + "chicken-boot[.exe]" that can be given as the value of the + "CHICKEN" argument when invoking make(1). Note that the path + to an existing `chicken' binary must be given to use it for + compiling the Scheme code of the runtime-system and compiler. + + "scripts/bootstrap.sh" automates this process, use this script if + you are unsure how to build from the repository sources. It + downloads the necessary development snapshot with wget(1) + and builds the boot-chicken that you can use to compile the + development sources. The invocation is + + scripts/bootstrap.sh PLATFORM= ... + + You can add additional parameters if you like to customize the + build, but this should not be necessary. Note that your current + working directory must be the root directory of the CHICKEN + git(1) repository. Once the boot-chicken is built, proceed by + invoking make(1) as described above, with the additional + parameter + + make CHICKEN=./chicken-boot PLATFORM=<...> PREFIX=<...> 7. Emacs support diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh new file mode 100755 index 0000000..e74cf2d --- /dev/null +++ b/scripts/bootstrap.sh @@ -0,0 +1,39 @@ +#!/bin/sh +set -e + +if test -z "$1"; then + echo "usage: bootstrap.sh PLATFORM= VAR= ..." >&2 + exit 1 +fi + +# build 5.0.0pre4 development snapshot + +mkdir -p boot/pre4 +cd boot +wget http://code.call-cc.org/dev-snapshots/2017/12/14/chicken-5.0.0pre4.tar.gz +tar xfz chicken-5.0.0pre4.tar.gz +cd chicken-5.0.0pre4 +make PREFIX=$PWD/../pre4 "$@" +make PREFIX=$PWD/../pre4 "$@" install +cd ../.. + +# build a boot-chicken from git head using pre4 chicken and +# then use that to build the real thing +# +# baf6363e535b26a67d0b9a7d71a93d8deb5de8c6 hardcodes +# some import libraries and removes deprecated internals, so +# a boot-chicken needs to be built. + +make "$@" spotless +make CHICKEN=$PWD/boot/pre4/bin/chicken "$@" boot-chicken + +# remove pre4 installation and tarball +rm -fr boot/pre4 +rm -fr boot/chicken-5.0.0pre4 +rm -f boot/chicken-5.0.0pre4.tar.gz + +echo +echo "now proceed by building the proper chicken by passing" +echo "'CHICKEN=./chicken-boot' in addition to PREFIX, PLATFORM" +echo "and further parameters." +echo -- 1.7.9.5