File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,14 @@ bootstrap:
83
83
diff -w .compiler.orig.tmp .compiler.out.tmp
84
84
rm .compiler.out.tmp .compiler.orig.tmp
85
85
86
+ compiler% .secd : PARENT=compiler$$(($* - 1 ) ).secd
87
+ compiler% .secd : compiler% .lisp $(PARENT ) $(BIN )
88
+ ./$(BIN ) $(PARENT ) $< | fmt -w 80 > $@
89
+ ./$(BIN ) $@ $< | fmt -w 80 > $@ .bootstrap
90
+ diff -y -d $@ $@ .bootstrap
91
+
92
+ compilers : $(addsuffix .secd, $(basename $(wildcard compiler* .lisp) ) )
93
+
86
94
archive :
87
95
git archive --prefix=lispkit-$(SOURCE_ID ) / HEAD | gzip > lispkit-$(SOURCE_ID ) .tar.gz
88
96
Original file line number Diff line number Diff line change @@ -32,15 +32,15 @@ function bootstrap {
32
32
local Ps=$2
33
33
local Po=${Ps/ .lisp/ .secd}
34
34
local CPo=${Po} .bootstrap
35
- m $Co $Ps $Po
36
- m $Po $Ps $CPo
37
- d $Po $CPo
35
+ m $Co $Ps $Po # compile compiler with earlier compiler
36
+ m $Po $Ps $CPo # compile compiler with itself
37
+ d $Po $CPo # compare the results of above two
38
38
echo " Bootstrap OK"
39
39
}
40
40
41
41
cat $COMPILER | tr ' \n' ' ' | fmt -w 80 > compiler0.secd
42
42
cat $SOURCE | tr ' \n' ' ' | fmt -w 80 > compiler1.lisp
43
43
44
- bootstrap compiler0.secd compiler1.lisp
45
- bootstrap compiler1 .secd compiler2 .lisp
46
- bootstrap compiler2.secd compiler3.lisp
44
+ for n in $( seq 0 2 ) ; do
45
+ bootstrap compiler $n .secd compiler $(( n + 1 )) .lisp
46
+ done
You can’t perform that action at this time.
0 commit comments