<commit_before>PROJ=hsem
BUILDDIR=$(PWD)/_build

OSTYPE:=$(shell ocamlfind ocamlc -config | awk '/^os_type:/ {print $$2}')

OCB = ocamlbuild

all: sharedlib build

sharedlib:
	$(OCB) lib$(PROJ).so
	cp $(BUILDDIR)/lib/lib$(PROJ).so $(BUILDDIR)/

build:
	$(OCB) -I src/ -I bin/ main.native
	cp $(BUILDDIR)/bin/main.native $(PROJ)

clean:
	$(OCB) -clean

test: all
	$(MAKE) -C $@
ifeq ($(OSTYPE),Win32)
	(cd test && PATH="$(BUILDDIR)/lib:$(PATH)" $(BUILDDIR)/test/test.native)<commit_msg>Allow passing options to OCB.<commit_after>PROJ=hsem
BUILDDIR=$(PWD)/_build

OSTYPE:=$(shell ocamlfind ocamlc -config | awk '/^os_type:/ {print $$2}')

OCB = ocamlbuild

all: sharedlib build

sharedlib:
	$(OCB) lib$(PROJ).so
	cp $(BUILDDIR)/lib/lib$(PROJ).so $(BUILDDIR)/

build:
	$(OCB) -I src/ -I bin/ main.native $(OCB_FLAGS)
	cp $(BUILDDIR)/bin/main.native $(PROJ)

clean:
	$(OCB) -clean

test: all
	$(MAKE) -C $@
ifeq ($(OSTYPE),Win32)
	(cd test && PATH="$(BUILDDIR)/lib:$(PATH)" $(BUILDDIR)/test/test.native)
{'fraction_non_alphanumeric': 0.21621621621621623, 'fraction_numerical': 0.006006006006006006, 'mean_word_length': 4.714285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '459083', 'n_tokens_mistral': 430, 'n_tokens_neox': 438, 'n_words': 92}