<commit_before>DESTDIR=
PREFIX=/usr
BINDIR=/bin
INSTALL=install

CFLAGS=-Wall -O3 -fomit-frame-pointer
#CC=gcc

# owl needs just a single binary
owl: bin/ol 

## fasl (plain bytecode) image boostrap

fasl/boot.fasl: fasl/init.fasl
	# start bootstrapping with the bundled init.fasl image
	cp fasl/init.fasl fasl/boot.fasl

fasl/ol.fasl: bin/vm fasl/boot.fasl owl/*.l
	# selfcompile boot.fasl until a fixed point is reached
	bin/vm fasl/boot.fasl --run owl/ol.l -s none -o fasl/bootp.fasl
	# check that the new image passes tests
	tests/run bin/vm fasl/bootp.fasl
	md5sum fasl/boot.fasl
	md5sum fasl/bootp.fasl
	# copy new image to ol.fasl if it is a fixed point, otherwise recompile
	diff -q fasl/boot.fasl fasl/bootp.fasl && cp fasl/bootp.fasl fasl/ol.fasl || cp fasl/bootp.fasl fasl/boot.fasl && make fasl/ol.fasl
	

## building just the virtual machine to run fasl images

bin/vm: c/vm.c
	$(CC) $(CFLAGS) -o bin/vm c/vm.c

c/vm.c: c/ovm.c
	# make a vm without a bundled heap
	echo "unsigned char *heap = 0;" > c/vm.c
	cat c/ovm.c >> c/vm.c


## building standalone image out of the fixed point fasl image

c/ol.c: fasl/ol.fasl
	# compile the repl using the fixed point image 
	bin/vm fasl/ol.fasl --run owl/ol.l -s some -o c/ol.c
<commit_msg>removed md5sums, which are called md5 on some systems<commit_after>DESTDIR=
PREFIX=/usr
BINDIR=/bin
INSTALL=install

CFLAGS=-Wall -O3 -fomit-frame-pointer
#CC=gcc

# owl needs just a single binary
owl: bin/ol 

## fasl (plain bytecode) image boostrap

fasl/boot.fasl: fasl/init.fasl
	# start bootstrapping with the bundled init.fasl image
	cp fasl/init.fasl fasl/boot.fasl

fasl/ol.fasl: bin/vm fasl/boot.fasl owl/*.l
	# selfcompile boot.fasl until a fixed point is reached
	bin/vm fasl/boot.fasl --run owl/ol.l -s none -o fasl/bootp.fasl
	# check that the new image passes tests
	tests/run bin/vm fasl/bootp.fasl
	# copy new image to ol.fasl if it is a fixed point, otherwise recompile
	diff -q fasl/boot.fasl fasl/bootp.fasl && cp fasl/bootp.fasl fasl/ol.fasl || cp fasl/bootp.fasl fasl/boot.fasl && make fasl/ol.fasl
	

## building just the virtual machine to run fasl images

bin/vm: c/vm.c
	$(CC) $(CFLAGS) -o bin/vm c/vm.c

c/vm.c: c/ovm.c
	# make a vm without a bundled heap
	echo "unsigned char *heap = 0;" > c/vm.c
	cat c/ovm.c >> c/vm.c


## building standalone image out of the fixed point fasl image

c/ol.c: fasl/ol.fasl
	# compile the repl using the fixed point image 
	bin/vm fasl/ol.fasl --run owl/ol.l -s some -o c/ol.c

{'fraction_non_alphanumeric': 0.11567916162837566, 'fraction_numerical': 0.0032245062474808546, 'mean_word_length': 3.2427350427350428, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6210149', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1083, 'n_words': 312}