<commit_before>TOP = ../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/cabal-flags.mk

TIMEOUT_PROGRAM = install-inplace/bin/timeout$(exeext)

ifeq "$(findstring thr,$(GhcRTSWays))" ""
$(TIMEOUT_PROGRAM): timeout.py
	$(MKDIRHIER) `dirname $@`
	cp $< $@
	chmod +x $@
else
$(TIMEOUT_PROGRAM): timeout.hs
	$(CABAL) configure $(USE_STAGE1_CONFIGURE_FLAGS)   \
	                   $(INPLACE_DIRS_CONFIGURE_FLAGS) \
	                   $(COMMON_CONFIGURE_FLAGS)       \
					   --ghc-option=-threaded
	$(CABAL) build
	$(CABAL) install
endif

boot all :: calibrate.out $(TIMEOUT_PROGRAM)

calibrate.out:
	$(RM) -f TimeMe.o TimeMe.hi TimeMe TimeMe.exe
	$(PYTHON) calibrate "$(GHC_STAGE1)" > $@
# We use stage 1 to do the calibration, as stage 2 may not exist.
# This isn't necessarily the compiler we'll be running the testsuite
# with, but it's really the performance of the machine that we're
# interested in

clean distclean:
	$(CABAL) clean
	$(RM) -rf install-inplace
	$(RM) -f calibrate.out
<commit_msg>Don't fail when cleaning if cabal-bin doesn't exist<commit_after>TOP = ../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/cabal-flags.mk

TIMEOUT_PROGRAM = install-inplace/bin/timeout$(exeext)

ifeq "$(findstring thr,$(GhcRTSWays))" ""
$(TIMEOUT_PROGRAM): timeout.py
	$(MKDIRHIER) `dirname $@`
	cp $< $@
	chmod +x $@
else
$(TIMEOUT_PROGRAM): timeout.hs
	$(CABAL) configure $(USE_STAGE1_CONFIGURE_FLAGS)   \
	                   $(INPLACE_DIRS_CONFIGURE_FLAGS) \
	                   $(COMMON_CONFIGURE_FLAGS)       \
					   --ghc-option=-threaded
	$(CABAL) build
	$(CABAL) install
endif

boot all :: calibrate.out $(TIMEOUT_PROGRAM)

calibrate.out:
	$(RM) -f TimeMe.o TimeMe.hi TimeMe TimeMe.exe
	$(PYTHON) calibrate "$(GHC_STAGE1)" > $@
# We use stage 1 to do the calibration, as stage 2 may not exist.
# This isn't necessarily the compiler we'll be running the testsuite
# with, but it's really the performance of the machine that we're
# interested in

clean distclean:
	-$(CABAL) clean
	$(RM) -rf install-inplace
	$(RM) -f calibrate.out

{'fraction_non_alphanumeric': 0.13930832927423284, 'fraction_numerical': 0.003896736483195324, 'mean_word_length': 3.626126126126126, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3071781', 'n_tokens_mistral': 792, 'n_tokens_neox': 729, 'n_words': 191}