<commit_before>all: compile

submodules:
	@git submodule init
	@git submodule update

deps/erlv8/ebin/erlv8.beam: submodules
	@cd deps/erlv8 && make compile

dependencies: deps/erlv8/ebin/erlv8.beam

test: compile
	@./rebar eunit

test-commonjs: compile
	@./beamjs -norepl -bundles node_compat commonjs  -load deps/commonjs/tests/unit-testing/1.0/program.js 

compile: dependencies
	@./rebar compile
	@cat ebin/beamjs.app | sed s/%sha%/`git log -1 --pretty=format:%h`/ > ebin/beamjs.app

release: compile
	@rm -rf rel/beamjs
	@rm -rf rel/apps
	@mkdir -p rel/apps/beamjs
	@cp -R ebin rel/apps/beamjs
	@cp -R deps/erlv8 rel/apps/
	@./rebar generate
	@rm -rf rel/apps

install: release
	rm -rf /usr/local/lib/beamjs<commit_msg>On make install, don't delete installation<commit_after>all: compile

submodules:
	@git submodule init
	@git submodule update

deps/erlv8/ebin/erlv8.beam: submodules
	@cd deps/erlv8 && make compile

dependencies: deps/erlv8/ebin/erlv8.beam

test: compile
	@./rebar eunit

test-commonjs: compile
	@./beamjs -norepl -bundles node_compat commonjs  -load deps/commonjs/tests/unit-testing/1.0/program.js 

compile: dependencies
	@./rebar compile
	@cat ebin/beamjs.app | sed s/%sha%/`git log -1 --pretty=format:%h`/ > ebin/beamjs.app

release: compile
	@rm -rf rel/beamjs
	@rm -rf rel/apps
	@mkdir -p rel/apps/beamjs
	@cp -R ebin rel/apps/beamjs
	@cp -R deps/erlv8 rel/apps/
	@./rebar generate
	@rm -rf rel/apps

install: release
{'fraction_non_alphanumeric': 0.13199723565998617, 'fraction_numerical': 0.01243953006219765, 'mean_word_length': 3.626198083067093, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3028951', 'n_tokens_mistral': 610, 'n_tokens_neox': 581, 'n_words': 143}