<commit_before>PACKAGE         ?= lasp
VERSION         ?= $(shell git describe --tags)
BASE_DIR         = $(shell pwd)
ERLANG_BIN       = $(shell dirname $(shell which erl))
REBAR            = $(shell pwd)/rebar3
MAKE						 = make

.PHONY: rel deps test plots dcos logs

all: compile

##
## Compilation targets
##

compile:
	$(REBAR) compile

clean: packageclean
	$(REBAR) clean

packageclean:
	rm -fr *.deb
	rm -fr *.tar.gz

##
## Test targets
##

check: test xref dialyzer

test: ct eunit ad-counter-simulations game-tournament-simulations

lint:
	${REBAR} as lint lint

eunit:
	${REBAR} eunit

ct:
	${REBAR} ct --suite=lasp_SUITE

ad-counter-simulations: client-server-ad-counter-simulation peer-to-peer-ad-counter-simulation ad-counter-overcounting ad-counter-partition-overcounting
game-tournament-simulations: client-server-game-tournament-simulation peer-to-peer-game-tournament-simulation

peer-to-peer-ad-counter-simulation:
	${REBAR} ct --suite=lasp_peer_to_peer_advertisement_counter_SUITE

client-server-ad-counter-simulation:
	${REBAR} ct --suite=lasp_client_server_advertisement_counter_SUITE

ad-counter-overcounting:
	${REBAR} ct --suite=lasp_advertisement_counter_overcounting_SUITE

ad-counter-partition-overcounting:
	${REBAR} ct --suite=lasp_advertisement_counter_partition_overcounting_SUITE

peer-to-peer-game-tournament-simulation:
	${REBAR} ct --suite=lasp_peer_to_peer_game_tournament_SUITE

client-server-game-tournament-simulation:
	${REBAR} ct --suite=lasp_client_server_game_tournament_SUITE

peer-to-peer-throughput-simulation:
	${REBAR} ct --suite=lasp_peer_to_peer_throughput_SUITE

client-server-throughput-simulation:
	${REBAR} ct --suite=lasp_client_server_throughput_SUITE

client-server-divergence-simulation:
	${REBAR} as test ct --suite=lasp_client_server_divergence_SUITE

##
## Release targets
##

rel:
	${REBAR} as exp release

stage:
	${REBAR} as exp release -d

##
## Packaging targets
##

package: rel
	fpm -s dir -t deb -n $(PACKAGE) -v $(VERSION) \
		--deb-user $(PACKAGE) \
		--deb-group $(PACKAGE) \
		--before-install=rel/before-install \
		_build/exp/rel/$(PACKAGE)=/opt/ \
		rel/init=/etc/init.d/$(PACKAGE) \
		rel/var/lib/$(PACKAGE)/=/var/lib/$(PACKAGE)/ \
		rel/var/log/$(PACKAGE)/=/var/log/$(PACKAGE)/ \
		rel/etc/$(PACKAGE)/$(PACKAGE).config=/etc/$(PACKAGE)/$(PACKAGE).config \
		rel/etc/default/$(PACKAGE)=/etc/default/$(PACKAGE)

package_cloud: package
	docker build -f Dockerfiles/packager -t cmeiklejohn/packager .
	docker run -i -t -v ~/.packagecloud:/root/.packagecloud cmeiklejohn/packager
<commit_msg>Fix makefile.<commit_after>PACKAGE         ?= lasp
VERSION         ?= $(shell git describe --tags)
BASE_DIR         = $(shell pwd)
ERLANG_BIN       = $(shell dirname $(shell which erl))
REBAR            = $(shell pwd)/rebar3
MAKE						 = make

.PHONY: rel deps test plots dcos logs fpm

all: compile

##
## Compilation targets
##

compile:
	$(REBAR) compile

clean: packageclean
	$(REBAR) clean

packageclean:
	rm -fr *.deb
	rm -fr *.tar.gz

##
## Test targets
##

check: test xref dialyzer

test: ct eunit ad-counter-simulations game-tournament-simulations

lint:
	${REBAR} as lint lint

eunit:
	${REBAR} eunit

ct:
	${REBAR} ct --suite=lasp_SUITE

ad-counter-simulations: client-server-ad-counter-simulation peer-to-peer-ad-counter-simulation ad-counter-overcounting ad-counter-partition-overcounting
game-tournament-simulations: client-server-game-tournament-simulation peer-to-peer-game-tournament-simulation

peer-to-peer-ad-counter-simulation:
	${REBAR} ct --suite=lasp_peer_to_peer_advertisement_counter_SUITE

client-server-ad-counter-simulation:
	${REBAR} ct --suite=lasp_client_server_advertisement_counter_SUITE

ad-counter-overcounting:
	${REBAR} ct --suite=lasp_advertisement_counter_overcounting_SUITE

ad-counter-partition-overcounting:
	${REBAR} ct --suite=lasp_advertisement_counter_partition_overcounting_SUITE

peer-to-peer-game-tournament-simulation:
	${REBAR} ct --suite=lasp_peer_to_peer_game_tournament_SUITE

client-server-game-tournament-simulation:
	${REBAR} ct --suite=lasp_client_server_game_tournament_SUITE

peer-to-peer-throughput-simulation:
	${REBAR} ct --suite=lasp_peer_to_peer_throughput_SUITE

client-server-throughput-simulation:
	${REBAR} ct --suite=lasp_client_server_throughput_SUITE

client-server-divergence-simulation:
	${REBAR} as test ct --suite=lasp_client_server_divergence_SUITE

##
## Release targets
##

rel:
	${REBAR} as exp release

stage:
	${REBAR} as exp release -d

##
## Packaging targets
##

fpm:
	gem install --no-ri --no-rdoc fpm

package: rel fpm
	fpm -s dir -t deb -n $(PACKAGE) -v $(VERSION) \
		--deb-user $(PACKAGE) \
		--deb-group $(PACKAGE) \
		--before-install=rel/before-install \
		_build/exp/rel/$(PACKAGE)=/opt/ \
		rel/init=/etc/init.d/$(PACKAGE) \
		rel/var/lib/$(PACKAGE)/=/var/lib/$(PACKAGE)/ \
		rel/var/log/$(PACKAGE)/=/var/log/$(PACKAGE)/ \
		rel/etc/$(PACKAGE)/$(PACKAGE).config=/etc/$(PACKAGE)/$(PACKAGE).config \
		rel/etc/default/$(PACKAGE)=/etc/default/$(PACKAGE)

package_cloud: package
	docker build -f Dockerfiles/packager -t cmeiklejohn/packager .
	docker run -i -t -v ~/.packagecloud:/root/.packagecloud cmeiklejohn/packager

{'fraction_non_alphanumeric': 0.14211237690673875, 'fraction_numerical': 0.0003861749372465727, 'mean_word_length': 4.2803261977573905, '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': '6751230', 'n_tokens_mistral': 2071, 'n_tokens_neox': 1912, 'n_words': 343}