<commit_before>PREFIX = /usr/local

CHROMIUM_SUFFIX  =
CHROMIUM_NAME    = chromium$(CHROMIUM_SUFFIX)
CHROMIUM_BINARY  = /usr/lib/$(CHROMIUM_NAME)/$(CHROMIUM_NAME)
PEPPER_FLASH_DIR = /usr/lib/PepperFlash

override CFLAGS += $(shell pkg-config --cflags glib-2.0 json-glib-1.0)
override LDLIBS += $(shell pkg-config --libs glib-2.0 json-glib-1.0)
override CPPFLAGS += \
	-DLAUNCHER_VERSION=\"$(shell git describe)\" \
	-DCHROMIUM_NAME=\"$(CHROMIUM_NAME)\" \
	-DCHROMIUM_BINARY=\"$(CHROMIUM_BINARY)\" \
	-DPEPPER_FLASH_DIR=\"$(PEPPER_FLASH_DIR)\"

ifeq ($(ENABLE_GCOV),1)
	RUNTESTS_CFLAGS = -fprofile-arcs -ftest-coverage
endif

$(CHROMIUM_NAME): launcher.c
	$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $< $(LDLIBS)

runtests: launcher_test.c minunit.h launcher.c
	$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(RUNTESTS_CFLAGS) $(LDFLAGS) $< $(LDLIBS)

check: runtests
	./runtests<commit_msg>Set static launcher version if git describe fails<commit_after>PREFIX = /usr/local

CHROMIUM_SUFFIX  =
CHROMIUM_NAME    = chromium$(CHROMIUM_SUFFIX)
CHROMIUM_BINARY  = /usr/lib/$(CHROMIUM_NAME)/$(CHROMIUM_NAME)
PEPPER_FLASH_DIR = /usr/lib/PepperFlash

override CFLAGS += $(shell pkg-config --cflags glib-2.0 json-glib-1.0)
override LDLIBS += $(shell pkg-config --libs glib-2.0 json-glib-1.0)
override CPPFLAGS += \
	-DLAUNCHER_VERSION=\"$(shell git describe || echo v5)\" \
	-DCHROMIUM_NAME=\"$(CHROMIUM_NAME)\" \
	-DCHROMIUM_BINARY=\"$(CHROMIUM_BINARY)\" \
	-DPEPPER_FLASH_DIR=\"$(PEPPER_FLASH_DIR)\"

ifeq ($(ENABLE_GCOV),1)
	RUNTESTS_CFLAGS = -fprofile-arcs -ftest-coverage
endif

$(CHROMIUM_NAME): launcher.c
	$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $< $(LDLIBS)

runtests: launcher_test.c minunit.h launcher.c
	$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(RUNTESTS_CFLAGS) $(LDFLAGS) $< $(LDLIBS)

check: runtests
	./runtests
{'fraction_non_alphanumeric': 0.17839335180055402, 'fraction_numerical': 0.010526315789473684, 'mean_word_length': 4.921311475409836, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1124868', 'n_tokens_mistral': 805, 'n_tokens_neox': 784, 'n_words': 126}