~ chicken-core (chicken-5) /scripts/bootstrap.sh


 1#!/bin/sh
 2
 3set -e
 4
 5# When cd is given as argument a directory that cannot be found in the
 6# paths yielded by CDPATH on OpenBSD's ksh (same binary as sh), it
 7# fails with
 8#     `sh: cd: <the dir>: bad directory'
 9# So, we unset CDPATH to avoid such problems.
10unset CDPATH
11
12# build 5.3.0 release
13
14mkdir -p boot/snapshot
15cd boot
16wget -c https://code.call-cc.org/releases/5.3.0/chicken-5.3.0.tar.gz
17tar -xzf chicken-5.3.0.tar.gz
18cd chicken-5.3.0
19make "$@" PREFIX="$(pwd)"/../snapshot
20make "$@" PREFIX="$(pwd)"/../snapshot install
21cd ../..
22
23# build a boot-chicken from git head using the snapshot
24# chicken and then use that to build the real thing
25
26make "$@" spotless
27make "$@" CHICKEN="$(pwd)"/boot/snapshot/bin/chicken boot-chicken
28
29# remove snapshot installation and tarball
30rm -fr boot/snapshot
31rm -fr boot/chicken-5.3.0
32rm -f  boot/chicken-5.3.0.tar.gz
33
34echo
35echo 'Now, build chicken by passing "CHICKEN=./chicken-boot" to make,'
36echo 'in addition to PREFIX, PLATFORM, and other parameters.'
37echo
Trap