~ chicken-core (chicken-5) 74b79c71ba105f61c7974f595d79689a7818c86b
commit 74b79c71ba105f61c7974f595d79689a7818c86b Author: felix <felix@call-with-current-continuation.org> AuthorDate: Sat Dec 30 14:15:03 2017 +0100 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Wed Jan 3 09:10:40 2018 +1300 Add script to automate bootstrapping and some instructions in the README Signed-off-by: Evan Hanson <evhan@foldling.org> diff --git a/README b/README index c7ec23c1..2569e5d8 100644 --- a/README +++ b/README @@ -91,7 +91,7 @@ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ to remove old configuration files. - 2.2. Building from git + 2.2. Building from Git If you build CHICKEN directly from the development sources out of the git repository, you will need a "chicken" executable to @@ -642,14 +642,31 @@ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ http://code.call-cc.org, unpack it, build and install it. Then change to the directory containing the git code and run: - make PLATFORM=<platform> CHICKEN=<path-to-existing-chicken> \ - boot-chicken + make PLATFORM=<platform> CHICKEN=<path-to-existing-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=<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 (in 2.2, Building from Git), + with the additional parameter: + + make CHICKEN=./chicken-boot ... 7. Emacs support diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh new file mode 100755 index 00000000..626d3638 --- /dev/null +++ b/scripts/bootstrap.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +set -e + +# 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, build chicken by passing "CHICKEN=./chicken-boot" to make,' +echo 'in addition to PREFIX, PLATFORM, and other parameters.' +echoTrap