<commit_before>VSN=1.0.0
ERLC=/usr/local/bin/erlc
ERL=/usr/local/bin/erl
APPDIR= $(abspath ./_build/development/apps/sinan-$(VSN))
SRCDIR=src
TESTDIR=test
COPYDIRS= src test priv
BEAMDIR=$(APPDIR)/ebin
RSYNC_OPTIONS=-vaz --delete

.SUFFIXES: .erl .beam .yrl

vpath %.erl src test

ERL_OBJ = $(patsubst src/%.erl,$(BEAMDIR)/%.beam, $(wildcard $(SRCDIR)/*erl))
ERL_TEST_OBJ = $(patsubst test/%.erl,$(BEAMDIR)/%.beam, $(wildcard $(TESTDIR)/*erl))

all: main

setup: $(COPYDIRS)
	for f in $^ ; do	\
                mkdir -p $(APPDIR)/$$f ; \
		rsync $(RSYNC_OPTIONS) $$f $(APPDIR); \
	done
	mkdir -p $(APPDIR)/ebin;
	rsync $(RSYNC_OPTIONS) ebin/sinan.app $(APPDIR)/ebin/sinan.app

main: setup ${ERL_OBJ} ${ERL_TEST_OBJ}

$(BEAMDIR)/%.beam: %.erl
#         +warn_unused_vars Both of these should be enabled but can't until
#        proper is fixed
	erlc +warn_export_vars +warn_export_all \
	+warn_obsolete_guard \
	+warnings_as_errors +bin_opt_info +debug_info -W -o $(BEAMDIR) $<

proper: main
	for f in ${ERL_TEST_OBJ} ; do	\
		$(ERL) -noshell -pa $(BEAMDIR) -s proper module `basename $$f .beam` -s init stop; \
	done

run: main
	$(ERL) -pa $(BEAMDIR) -s sin_app manual_start

debug: main
	$(ERL) -pa $(BEAMDIR) -s sin_app manual_start -s debugger start

clean:<commit_msg>convert the makefile to be a bit more useful<commit_after>VSN=1.0.1
ERLC=/usr/local/bin/erlc
ERL=/usr/local/bin/erl
APPDIR= $(abspath ./_build/development/apps/sinan-$(VSN))
SRCDIR=src
TESTDIR=test
COPYDIRS= src test priv
BEAMDIR=$(APPDIR)/ebin
RSYNC_OPTIONS=-vaz --delete

.SUFFIXES: .erl .beam .yrl

vpath %.erl src test

ERL_OBJ = $(patsubst src/%.erl,$(BEAMDIR)/%.beam, $(wildcard $(SRCDIR)/*erl))
ERL_TEST_OBJ = $(patsubst test/%.erl,$(BEAMDIR)/%.beam, $(wildcard $(TESTDIR)/*erl))

all: main

setup: $(COPYDIRS)
	for f in $^ ; do        \
		mkdir -p $(APPDIR)/$$f ; \
		rsync $(RSYNC_OPTIONS) $$f $(APPDIR); \
	done
	mkdir -p $(APPDIR)/ebin;
	rsync $(RSYNC_OPTIONS) ebin/sinan.app $(APPDIR)/ebin/sinan.app

main: setup ${ERL_OBJ} ${ERL_TEST_OBJ}

$(BEAMDIR)/%.beam: %.erl
	erlc +warn_export_vars +warn_export_all \
	+warn_obsolete_guard \
	+warnings_as_errors +bin_opt_info +debug_info -W -o $(BEAMDIR) $<

cucumber: main
	erl -pa $(BEAMDIR) -s sinan manual_start -s sinan main -extra -s $(CURDIR) cucumber

test: main
	erl -pa $(BEAMDIR) -s sinan manual_start -s sinan main -extra -s $(CURDIR) test

run: main
	$(ERL) -pa $(BEAMDIR) -s sin_app manual_start

debug: main
	$(ERL) -pa $(BEAMDIR) -s sin_app manual_start -s debugger start

clean:
{'fraction_non_alphanumeric': 0.17096390321301072, 'fraction_numerical': 0.002380007933359778, 'mean_word_length': 3.9645669291338583, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5019555', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1075, 'n_words': 255}