<commit_before>
all: no_examples examples
no_examples: check_lwt compiler compiler_lib library ocamlbuild runtime doc

include Makefile.conf
-include Makefile.local

.PHONY: all no_examples compiler library ocamlbuild runtime examples check_lwt doc

compiler:
	$(MAKE) -C compiler
compiler_lib: compiler
	$(MAKE) -C compiler lib
library:
	$(MAKE) -C lib
ocamlbuild:
	$(MAKE) -C ocamlbuild
runtime:
	$(MAKE) -C runtime
toplevel: compiler compiler_lib library runtime
	$(MAKE) -C toplevel
examples: compiler library runtime
	$(MAKE) -C examples
tests: compiler library runtime
	$(MAKE) -C tests
phantomtests: compiler library runtime
	$(MAKE) -C tests phantom
doc: library ocamlbuild
	$(MAKE) -C doc

LWTERROR="Js_of_ocaml requires Lwt version 2.3.0 at least.  Please upgrade."
check_lwt:
	@if ocamlfind query lwt -l | ocaml tools/check_version.ml 2.3.0; then \
	  echo $(LWTERROR); exit 1; \
	fi

include Makefile.filelist

VERSION := $(shell head -n 1 VERSION)
install:
	ocamlfind install -patch-version ${VERSION} $(LIBRARY) lib/META $(INTF) $(IMPL) $(OTHERS) $(DOC)
	ocamlfind install -patch-version ${VERSION} $(COMPILER_LIBRARY) compiler/META $(COMP_INTF) $(COMP_IMPL)
	install -d -m 755 $(BINDIR)
	install $(BIN) $(BINDIR)

uninstall:
	ocamlfind remove $(LIBRARY)
	ocamlfind remove $(COMPILER_LIBRARY)
	rm -f $(BINDIR)/$(COMPILER)
	rm -f $(BINDIR)/$(MINIFIER)

reinstall: uninstall install

depend:
	$(MAKE) -C compiler depend
	$(MAKE) -C lib depend

clean:
	$(MAKE) -C compiler clean
	$(MAKE) -C lib clean
	$(MAKE) -C ocamlbuild clean
	$(MAKE) -C runtime clean
	$(MAKE) -C toplevel clean
	$(MAKE) -C examples clean
ifeq ($(wildcard tests),tests)
	$(MAKE) -C tests clean
	$(MAKE) -C doc clean
endif

realclean: clean
	find . -name "*~" -print | xargs rm -f

dist:
	rm -rf /tmp/js_of_ocaml-${VERSION} &&\
        cd /tmp &&\
	git clone https://github.com/ocsigen/js_of_ocaml.git js_of_ocaml-${VERSION} &&\
	(cd js_of_ocaml-${VERSION}; git checkout ${VERSION}) &&\
	tar zcvf js_of_ocaml-${VERSION}.tar.gz js_of_ocaml-${VERSION} --exclude benchmarks --exclude .git --exclude tests
<commit_msg>CLEAN<commit_after>
all: no_examples examples
no_examples: check_lwt compiler compiler_lib library ocamlbuild runtime doc

include Makefile.conf
-include Makefile.local

.PHONY: all no_examples compiler library ocamlbuild runtime examples check_lwt doc

compiler:
	$(MAKE) -C compiler
compiler_lib: compiler
	$(MAKE) -C compiler lib
library:
	$(MAKE) -C lib
ocamlbuild:
	$(MAKE) -C ocamlbuild
runtime:
	$(MAKE) -C runtime
toplevel: compiler compiler_lib library runtime
	$(MAKE) -C toplevel
examples: compiler library runtime
	$(MAKE) -C examples
tests: compiler library runtime
	$(MAKE) -C tests
phantomtests: compiler library runtime
	$(MAKE) -C tests phantom
doc: library ocamlbuild
	$(MAKE) -C doc

LWTERROR="Js_of_ocaml requires Lwt version 2.3.0 at least.  Please upgrade."
check_lwt:
	@if ocamlfind query lwt -l | ocaml tools/check_version.ml 2.3.0; then \
	  echo $(LWTERROR); exit 1; \
	fi

include Makefile.filelist

VERSION := $(shell head -n 1 VERSION)
install:
	ocamlfind install -patch-version ${VERSION} $(LIBRARY) lib/META $(INTF) $(IMPL) $(OTHERS) $(DOC)
	ocamlfind install -patch-version ${VERSION} $(COMPILER_LIBRARY) compiler/META $(COMP_INTF) $(COMP_IMPL)
	install -d -m 755 $(BINDIR)
	install $(BIN) $(BINDIR)

uninstall:
	ocamlfind remove $(LIBRARY)
	ocamlfind remove $(COMPILER_LIBRARY)
	rm -f $(BINDIR)/$(COMPILER)
	rm -f $(BINDIR)/$(MINIFIER)

reinstall: uninstall install

depend:
	$(MAKE) -C compiler depend
	$(MAKE) -C lib depend

clean:
	$(MAKE) -C compiler clean
	$(MAKE) -C lib clean
	$(MAKE) -C ocamlbuild clean
	$(MAKE) -C runtime clean
	$(MAKE) -C toplevel clean
	$(MAKE) -C examples clean
ifeq ($(wildcard tests),tests)
	$(MAKE) -C tests clean
	$(MAKE) -C doc clean
endif

realclean: clean
	find . -name "*~" -print | xargs rm -f
	find . -name "*.tmpjs" -print | xargs rm -f

dist:
	rm -rf /tmp/js_of_ocaml-${VERSION} &&\
        cd /tmp &&\
	git clone https://github.com/ocsigen/js_of_ocaml.git js_of_ocaml-${VERSION} &&\
	(cd js_of_ocaml-${VERSION}; git checkout ${VERSION}) &&\
	tar zcvf js_of_ocaml-${VERSION}.tar.gz js_of_ocaml-${VERSION} --exclude benchmarks --exclude .git --exclude tests

{'fraction_non_alphanumeric': 0.13413768630234207, 'fraction_numerical': 0.005204636858291933, 'mean_word_length': 4.324937027707809, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5650540', 'n_tokens_mistral': 1613, 'n_tokens_neox': 1530, 'n_words': 483}