Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,34 @@ build:
install:
DESTDIR="$(DESTDIR)" ./install.sh

boot:
GERBIL_BUILD_FLAGS="$(MAKEFLAGS)" ./build.sh prepare
GERBIL_BUILD_FLAGS="$(MAKEFLAGS)" ./build.sh gambit
GERBIL_BUILD_FLAGS="$(MAKEFLAGS)" ./build.sh boot-gxi

stage0:
GERBIL_BUILD_FLAGS="$(MAKEFLAGS)" ./build.sh stage0

stage1:
GERBIL_BUILD_FLAGS="$(MAKEFLAGS)" ./build.sh stage1

stdlib:
GERBIL_BUILD_FLAGS="$(MAKEFLAGS)" ./build.sh stdlib

check:
./build.sh env gxtest ./...

mostly-clean:
rm -rf build/lib/gerbil
rm -rf build/lib/std
rm -rf build/lib/static

boot-clean: mostly-clean
rm -rf bootstrap/lib/gerbil

clean:
rm -rf build
rm -rf bootstrap
cd src/gambit && make clean

.PHONY: all build install check clean
.PHONY: all build install check clean mostly-clean
5 changes: 5 additions & 0 deletions README-v0.19.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is the v0.19 development branch

there are many changes coming, many of them source breaking, so we
decided it to keep master as is (it is in a good shape) until v0.19 is
read.
10 changes: 7 additions & 3 deletions doc/reference/dev/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ $ rm -rf bootstrap/*

# copy the builtin ssxi module
$ mkdir -p bootstrap/gerbil
$ cp gerbil/builtin.ssxi.ss bootstrap/gerbil
$ cp gerbil/builtin.ssxi.ss bootstrap/gerbil/

# compile the bootstrap with the current installed compiler
$ gxc -O -d bootstrap -s -S gerbil/core/{runtime,expander,sugar,mop,macro-object,match,more-sugar,more-syntax-sugar,module-sugar}.ss gerbil/core.ss gerbil/runtime/{gambit,util,table,control,system,c3,mop,error,interface,hash,thread,syntax,eval,repl,loader,init}.ss gerbil/runtime.ss gerbil/expander/{common,stx,core,top,module,compile,root,stxcase}.ss gerbil/expander.ss gerbil/compiler/{base,method,compile,optimize-base,optimize-xform,optimize-top,optimize-spec,optimize-ann,optimize-call,optimize,driver,ssxi}.ss gerbil/compiler.ss gerbil/gambit.ss
Expand All @@ -193,6 +193,11 @@ core, the simple recompilation approach outlined above is
insufficient. What you want to do in this case is a recursive
bootstrap recompilation.

If you are still in the `src/` subdirectory, go back to the top the Gerbil repository:
```
cd ..
```

- First build the base bootstrap, using your extant gxc -- either latest master or previous recursive bootstrap in your branch:
```
$ ./src/bootstrap.sh
Expand Down Expand Up @@ -237,8 +242,7 @@ and succeed in bootstrapping your changes.

### Strictures on Modifying Parts of the Gerbil Bootstrap

***Every change to the Gerbil Bootstrap
must be API-compatible from one version to the next***:
***Every change to the Gerbil Bootstrap must be API-compatible from one version to the next***:
both the old and new versions of Gerbil
(before and after recompiling the bootstrap) must be able to use them.

Expand Down
278 changes: 173 additions & 105 deletions doc/reference/gerbil/runtime/c3.md

Large diffs are not rendered by default.

80 changes: 76 additions & 4 deletions src/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,79 @@ if [ ! -z "$GERBIL_BUILD_NOOPT" ]; then
gerbil_opt=""
fi

rm -rf bootstrap/*
mkdir -p bootstrap/gerbil
cp gerbil/builtin.ssxi.ss gerbil/builtin-inline-rules.ssxi.ss bootstrap/gerbil
gxc $gerbil_opt -d bootstrap -s -S gerbil/core/{runtime,expander,sugar,mop,macro-object,match,more-sugar,more-syntax-sugar,module-sugar,contract}.ss gerbil/core.ss gerbil/runtime/{gambit,util,table,control,system,c3,mop,mop-system-classes,error,interface,hash,thread,syntax,eval,repl,loader,init}.ss gerbil/runtime.ss gerbil/expander/{common,stx,core,top,module,compile,root,stxcase,init}.ss gerbil/expander.ss gerbil/compiler/{base,method,compile,optimize-base,optimize-xform,optimize-top,optimize-spec,optimize-ann,optimize-call,optimize,driver,ssxi}.ss gerbil/compiler.ss gerbil/gambit.ss
gerbil_core=$(echo gerbil/core/{runtime,expander,sugar,mop,macro-object,match,more-sugar,more-syntax-sugar,module-sugar,contract}.ss gerbil/core.ss)
gerbil_runtime=$(echo gerbil/runtime/{gambit,util,table,control,system,c3,mop,mop-system-classes,error,interface,hash,thread,syntax,eval,repl,loader,init}.ss gerbil/runtime.ss)
gerbil_expander=$(echo gerbil/expander/{common,stx,core,top,module,compile,root,stxcase,init}.ss gerbil/expander.ss)
gerbil_compiler=$(echo gerbil/compiler/{base,method,compile,optimize-base,optimize-xform,optimize-top,optimize-spec,optimize-ann,optimize-call,optimize,driver,ssxi}.ss gerbil/compiler.ss)

prepare() {
rm -rf bootstrap/*
mkdir -p bootstrap/gerbil
cp gerbil/builtin.ssxi.ss gerbil/builtin-inline-rules.ssxi.ss bootstrap/gerbil
}

build() {
gxc $gerbil_opt -d bootstrap -s -S $*
}

build_all() {
prepare
build $gerbil_core $gerbil_runtime $gerbil_expander $gerbil_compiler
}

build_noopt() {
gerbil_opt=""
build_all
}

build_core() {
build $gerbil_core
}

build_runtime() {
build $gerbil_runtime
}

build_expander() {
build $gerbil_expander
}

build_compiler() {
build $gerbil_compiler
}

die() {
local exitcode=$?
echo "bootstrap failed"
exit $exitcode
}


if [ "$#" -eq 0 ]; then
build_all
else
case "$1" in
"prepare")
prepare || die
;;
"core")
build_core || die
;;
"runtime")
build_runtime || die
;;
"expander")
build_expander || die
;;
"compiler")
build_compiler || die
;;
"noopt")
build_noopt || die
;;
*)
echo "unexpected argument $1"
die
;;
esac
fi
Loading
Loading