<commit_before>CURDIR := $(shell pwd)

clean:
	@make -C deps/v8 clean
	@rm -rf out

test-v8:
	@./tools/gyp_bastian bastian.gyp -Dhost_arch=x64
	@make -C out<commit_msg>make lib for test<commit_after>CURDIR := $(shell pwd)

lowercase = $(shell echo $1 | tr A-Z a-z)

GTEST_LIBS_PATH := deps/gtest/cbuild
SYS_NAME := $(shell uname -s)
SYS_NAME_LOWER := $(call lowercase,${SYS_NAME})


ifeq (${SYS_NAME_LOWER},linux)
	SYS_CMAKE_FLAGS :=
else
	SYS_CMAKE_FLAGS := -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libstdc++ -U__STRICT_ANSI__"
endif


clean:
	@rm -rf out

lib-v8:
	@./tools/gyp_bastian bastian.gyp -Dhost_arch=x64
	@make -C out

test/v8/run: ${GTEST_LIBS_PATH} lib-v8
	@g++ -o test/v8/run -L${CURDIR}/${GTEST_LIBS_PATH} -lgtest -lgtest_main

test-v8: test/v8/run
	@./test/v8/run

${GTEST_LIBS_PATH}:
	@mkdir ${GTEST_LIBS_PATH}
	@cd ${GTEST_LIBS_PATH} && cmake -G"Unix Makefiles" ${SYS_CMAKE_FLAGS} .. && make
{'fraction_non_alphanumeric': 0.16868798235942667, 'fraction_numerical': 0.017640573318632856, 'mean_word_length': 4.503030303030303, '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': '2413276', 'n_tokens_mistral': 432, 'n_tokens_neox': 419, 'n_words': 81}