<commit_before>
ALL_TEST_SRC = $(filter-out %~ %\# %.m, $(wildcard test/*))
XFAIL_TEST_SRC = $(shell grep -l xfail $(ALL_TEST_SRC))

RUN_TEST_SRC = $(filter-out $(XFAIL_TEST_SRC), $(ALL_TEST_SRC))

CXXFLAGS := -g -O2 gc/lib/libgc.a -Igc/include -Irt

# Set up the flags to handle OpenCL
ifeq ($(shell uname), Darwin)
CXXFLAGS := $(CXXFLAGS) -framework OpenCL
CXX := g++-4.2
else
ifeq ($(shell uname), Linux)
# This should work on 64-bit Gentoo with NVIDIA GPUs at least. YMMV.
CXXFLAGS := $(CXXFLAGS) -I/opt/cuda/include -lOpenCL -lrt
CXX := g++
else
$(error Your operating system is not yet supported.)
endif
endif

HARLAN_SRC = \
	harlanc \
	$(wildcard harlan/*) \
	$(wildcard harlan/front/*) \
	$(wildcard harlan/middle/*) \
	$(wildcard harlan/back/*) \
	util/verify-grammar.ss \

# Invokes the harlan compiler. The first argument is the name of the
# source file, the second is the name of the output file.
HC = ./harlanc $(1) | $(CXX) -x c++ - -x none rt/libharlanrt.a $(CXXFLAGS) \
     -o $(2)

TEST_EXE_NAME = $(patsubst test/%, test.bin/%.bin, $(1))

TEST_OUT_NAME = $(patsubst test/%, test.bin/%.out, $(1))

COMPILE_TEST = $(call HC, $(1), $(call TEST_EXE_NAME, $(1)))

RUN_TEST = $(1)

.phony: check
check : test.bin gc/lib/libgc.a rt/libharlanrt.a
	@./run-tests.scm
	@echo "\033[32mAll tests succeeded.\033[39m"

.phony: force-check
force-check :
	rm -rf test.bin<commit_msg>Trivial change to the Makefile to make the text green again on Linux.<commit_after>
ALL_TEST_SRC = $(filter-out %~ %\# %.m, $(wildcard test/*))
XFAIL_TEST_SRC = $(shell grep -l xfail $(ALL_TEST_SRC))

RUN_TEST_SRC = $(filter-out $(XFAIL_TEST_SRC), $(ALL_TEST_SRC))

CXXFLAGS := -g -O2 gc/lib/libgc.a -Igc/include -Irt

# Set up the flags to handle OpenCL
ifeq ($(shell uname), Darwin)
CXXFLAGS := $(CXXFLAGS) -framework OpenCL
CXX := g++-4.2
else
ifeq ($(shell uname), Linux)
# This should work on 64-bit Gentoo with NVIDIA GPUs at least. YMMV.
CXXFLAGS := $(CXXFLAGS) -I/opt/cuda/include -lOpenCL -lrt
CXX := g++
ECHO_ESCAPE := "-e"
else
$(error Your operating system is not yet supported.)
endif
endif

HARLAN_SRC = \
	harlanc \
	$(wildcard harlan/*) \
	$(wildcard harlan/front/*) \
	$(wildcard harlan/middle/*) \
	$(wildcard harlan/back/*) \
	util/verify-grammar.ss \

# Invokes the harlan compiler. The first argument is the name of the
# source file, the second is the name of the output file.
HC = ./harlanc $(1) | $(CXX) -x c++ - -x none rt/libharlanrt.a $(CXXFLAGS) \
     -o $(2)

TEST_EXE_NAME = $(patsubst test/%, test.bin/%.bin, $(1))

TEST_OUT_NAME = $(patsubst test/%, test.bin/%.out, $(1))

COMPILE_TEST = $(call HC, $(1), $(call TEST_EXE_NAME, $(1)))

RUN_TEST = $(1)

.phony: check
check : test.bin gc/lib/libgc.a rt/libharlanrt.a
	@./run-tests.scm
	@echo $(ECHO_ESCAPE) "\033[32mAll tests succeeded.\033[39m"

.phony: force-check
force-check :
	rm -rf test.bin
{'fraction_non_alphanumeric': 0.17207678883071553, 'fraction_numerical': 0.015357766143106457, 'mean_word_length': 3.7215815485996706, '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': '6007236', 'n_tokens_mistral': 1194, 'n_tokens_neox': 1131, 'n_words': 326}