<commit_before>ifeq ($(DEBUG),true)
DEBUG_FLAGS = -DDEBUG
else
DEBUG_FLAGS =
endif

XMLRPC_SOURCE_ROOT=.
XMLRPC_INCLUDE_DIR=$(XMLRPC_SOURCE_ROOT)/include

SOURCE_DIR=src
EBIN_DIR=ebin
INCLUDE_DIR=include
INCLUDES=$(wildcard $(INCLUDE_DIR)/*.hrl)
SOURCES=$(wildcard $(SOURCE_DIR)/*.erl)
TARGETS=$(patsubst $(SOURCE_DIR)/%.erl, $(EBIN_DIR)/%.beam,$(SOURCES))

#other args: +native +"{hipe,[o3,verbose]}" -Ddebug=true +debug_info +no_strict_record_tests
ERLC_OPTS=-I $(XMLRPC_INCLUDE_DIR) -I $(INCLUDE_DIR) -o $(EBIN_DIR) $(DEBUG_FLAGS) -Wall +debug_info
ERL_CALL=erl -pa $(EBIN_DIR)

all: $(EBIN_DIR) $(TARGETS)

$(EBIN_DIR):
	mkdir -p $@

$(EBIN_DIR)/%.beam: $(SOURCE_DIR)/%.erl $(INCLUDES)
	erlc $(ERLC_OPTS) $<

run-tests: all
	echo "xmlrpc_tests:test()." | $(ERL_CALL)

dialyze: $(TARGETS)
	dialyzer -c $?

clean:
	rm -f ebin/*.beam $(TARGETS)
	rm -f build-stamp install-stamp

distclean: clean

<commit_msg>change build instruction for test<commit_after>ifeq ($(DEBUG),true)
DEBUG_FLAGS = -DDEBUG
else
DEBUG_FLAGS =
endif

XMLRPC_SOURCE_ROOT=.
XMLRPC_INCLUDE_DIR=$(XMLRPC_SOURCE_ROOT)/include

SOURCE_DIR=src
EBIN_DIR=ebin
INCLUDE_DIR=include
INCLUDES=$(wildcard $(INCLUDE_DIR)/*.hrl)
SOURCES=$(wildcard $(SOURCE_DIR)/*.erl)
TARGETS=$(patsubst $(SOURCE_DIR)/%.erl, $(EBIN_DIR)/%.beam,$(SOURCES))

#other args: +native +"{hipe,[o3,verbose]}" -Ddebug=true +debug_info +no_strict_record_tests
ERLC_OPTS=-I $(XMLRPC_INCLUDE_DIR) -I $(INCLUDE_DIR) -o $(EBIN_DIR) $(DEBUG_FLAGS) -DTEST -Wall +debug_info
ERL_CALL=erl -pa $(EBIN_DIR)

all: $(EBIN_DIR) $(TARGETS)

$(EBIN_DIR):
	mkdir -p $@

$(EBIN_DIR)/%.beam: $(SOURCE_DIR)/%.erl $(INCLUDES)
	erlc $(ERLC_OPTS) $<

run-tests: all
	$(ERL_CALL) \
	  -eval 'eunit:test("ebin", [verbose])' \
	  -s init stop

dialyze: $(TARGETS)
	dialyzer -c $?

clean:
	rm -f ebin/*.beam $(TARGETS)
	rm -f build-stamp install-stamp

distclean: clean


{'fraction_non_alphanumeric': 0.18317358892438765, 'fraction_numerical': 0.0010649627263045794, 'mean_word_length': 6.037453183520599, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '7667780', 'n_tokens_mistral': 850, 'n_tokens_neox': 776, 'n_words': 147}