<commit_before>SHELL=/bin/bash -o pipefail

CI_BUILD_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

${LOCAL_DIR}/lib/libgflags.a:
	cd /tmp && \
	curl -L https://github.com/gflags/gflags/archive/v2.1.2.tar.gz -o gflags.tar.gz && \
	tar xf gflags.tar.gz && \
	cd gflags-2.1.2 && \
	cmake -DCMAKE_INSTALL_PREFIX=${LOCAL_DIR} . && \
	make && \
	make install

# TODO: use official archive once https://github.com/SimonKagstrom/kcov/pull/146 is resolved and published.
${LOCAL_DIR}/bin/kcov:
	cd /tmp && \
	curl -L https://github.com/SimonKagstrom/kcov/archive/v33.tar.gz -o kcov.tar.gz && \
	tar xf kcov.tar.gz && \
	cd kcov-33 && \
	if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then \
	    cmake -G Xcode . && \
		xcodebuild -configuration Release && \
		cp src/Release/kcov ${LOCAL_DIR}/bin/kcov; \
	else \
	    cmake -DCMAKE_INSTALL_PREFIX=${LOCAL_DIR} . && \
		make && \
		make install; \
	fi

prepare_linux: ${LOCAL_DIR}/bin/kcov

prepare_brew:
	brew update && \
	brew install gflags snappy gperftools

prepare_osx: prepare_brew ${LOCAL_DIR}/bin/kcov

test_linux test_osx:
	export CI=true && ${CI_BUILD_DIR}/test.sh

cover_linux cover_osx:
	export LOG_LEVEL=DEBUG && \<commit_msg>Makefile: Remove outdated TODO (#10721)<commit_after>SHELL=/bin/bash -o pipefail

CI_BUILD_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

${LOCAL_DIR}/lib/libgflags.a:
	cd /tmp && \
	curl -L https://github.com/gflags/gflags/archive/v2.1.2.tar.gz -o gflags.tar.gz && \
	tar xf gflags.tar.gz && \
	cd gflags-2.1.2 && \
	cmake -DCMAKE_INSTALL_PREFIX=${LOCAL_DIR} . && \
	make && \
	make install

${LOCAL_DIR}/bin/kcov:
	cd /tmp && \
	curl -L https://github.com/SimonKagstrom/kcov/archive/v33.tar.gz -o kcov.tar.gz && \
	tar xf kcov.tar.gz && \
	cd kcov-33 && \
	if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then \
	    cmake -G Xcode . && \
		xcodebuild -configuration Release && \
		cp src/Release/kcov ${LOCAL_DIR}/bin/kcov; \
	else \
	    cmake -DCMAKE_INSTALL_PREFIX=${LOCAL_DIR} . && \
		make && \
		make install; \
	fi

prepare_linux: ${LOCAL_DIR}/bin/kcov

prepare_brew:
	brew update && \
	brew install gflags snappy gperftools

prepare_osx: prepare_brew ${LOCAL_DIR}/bin/kcov

test_linux test_osx:
	export CI=true && ${CI_BUILD_DIR}/test.sh

cover_linux cover_osx:
	export LOG_LEVEL=DEBUG && \
{'fraction_non_alphanumeric': 0.16855400696864112, 'fraction_numerical': 0.012195121951219513, 'mean_word_length': 3.383587786259542, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, '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': '7011544', 'n_tokens_mistral': 969, 'n_tokens_neox': 919, 'n_words': 176}