<commit_before>FSTAR_HOME=../..
include $(FSTAR_HOME)/src/gmake/z3.mk
include $(FSTAR_HOME)/src/gmake/fstar.mk

all: fstarlib.cmxa


ULIB_GEN_DIR=extracted

FIND=$(shell which gfind > /dev/null 2>&1 && echo gfind || echo find)
SED=$(shell which gsed > /dev/null 2>&1 && echo gsed || echo sed)
OCAMLBUILD=cd ../../ && ocamlbuild -use-ocamlfind -I ulib/ml -I ulib/ml/$(ULIB_GEN_DIR) -build-dir ulib/ml/_build

.PHONY:clean

all: .mgen install

fstarlib.mllib: .mgen *.ml $(wildcard extracted/*.ml)
	$(FIND) . extracted -maxdepth 1 -name "*.ml" -printf '%f\n' \
		| $(SED) -e 's/\.ml//g' -e 's/\./_/g' -e 's/\<./\u&/g' \
		| sort | uniq > $@
	touch fstarlib.ml

FSTARLIB_DIR=../../bin/fstarlib/

fstarlib.cma:fstarlib.mllib
	$(OCAMLBUILD) $@
	cp _build/ulib/ml/$@ $(FSTARLIB_DIR)

fstarlib.cmxa:fstarlib.mllib | fstarlib.cma
	$(OCAMLBUILD) $@
	cp _build/ulib/ml/$@ $(FSTARLIB_DIR)

install: fstarlib.cmxa fstarlib.cma
	cp _build/ulib/ml/fstarlib.a $(FSTARLIB_DIR)
	cp _build/ulib/ml/*.cmi $(FSTARLIB_DIR)
	cp _build/ulib/ml/extracted/*.cmi $(FSTARLIB_DIR)

.mgen:
	$(MAKE) -C .. .mgen


# Common rules
clean:
	rm -f fstarlib.mllib *~
	rm -fr $(ULIB_GEN_DIR) compiler-extracted
	rm -f $(FSTARLIB_DIR)/*.cm[aiox]a?<commit_msg>Invoke find with POSIX -print instead of GNU -printf<commit_after>FSTAR_HOME=../..
include $(FSTAR_HOME)/src/gmake/z3.mk
include $(FSTAR_HOME)/src/gmake/fstar.mk

all: fstarlib.cmxa


ULIB_GEN_DIR=extracted

FIND=$(shell which gfind > /dev/null 2>&1 && echo gfind || echo find)
SED=$(shell which gsed > /dev/null 2>&1 && echo gsed || echo sed)
OCAMLBUILD=cd ../../ && ocamlbuild -use-ocamlfind -I ulib/ml -I ulib/ml/$(ULIB_GEN_DIR) -build-dir ulib/ml/_build

.PHONY:clean

all: .mgen install

fstarlib.mllib: .mgen *.ml $(wildcard extracted/*.ml)
	$(FIND) . extracted -maxdepth 1 -name "*.ml" -print \
		| $(SED) -e 's!\([^/]*/\)!!g' \
		| $(SED) -e 's/\.ml//g' -e 's/\./_/g' -e 's/\<./\u&/g' \
		| sort | uniq > $@
	touch fstarlib.ml

FSTARLIB_DIR=../../bin/fstarlib/

fstarlib.cma:fstarlib.mllib
	$(OCAMLBUILD) $@
	cp _build/ulib/ml/$@ $(FSTARLIB_DIR)

fstarlib.cmxa:fstarlib.mllib | fstarlib.cma
	$(OCAMLBUILD) $@
	cp _build/ulib/ml/$@ $(FSTARLIB_DIR)

install: fstarlib.cmxa fstarlib.cma
	cp _build/ulib/ml/fstarlib.a $(FSTARLIB_DIR)
	cp _build/ulib/ml/*.cmi $(FSTARLIB_DIR)
	cp _build/ulib/ml/extracted/*.cmi $(FSTARLIB_DIR)

.mgen:
	$(MAKE) -C .. .mgen


# Common rules
clean:
	rm -f fstarlib.mllib *~
	rm -fr $(ULIB_GEN_DIR) compiler-extracted
	rm -f $(FSTARLIB_DIR)/*.cm[aiox]a?
{'fraction_non_alphanumeric': 0.20223374551256482, 'fraction_numerical': 0.004786597526924611, 'mean_word_length': 3.431095406360424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '2592771', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1146, 'n_words': 217}