<commit_before>HPROGS = hbal hscan hail hspace
HALLPROGS = $(HPROGS) test
HSRCS := $(wildcard Ganeti/HTools/*.hs) $(wildcard Ganeti/*.hs)
HDDIR = apidoc

DOCS = README.html NEWS.html

HFLAGS = -O2 -Wall -Werror -fwarn-monomorphism-restriction -fwarn-tabs
HEXTRA =

HPCEXCL = --exclude Main --exclude Ganeti.HTools.QC

# Haskell rules

all: $(HPROGS)

$(HALLPROGS): %: %.hs Ganeti/HTools/Version.hs $(HSRCS) Makefile
	ghc --make $(HFLAGS) $(HEXTRA) $@

test: HEXTRA=-fhpc -Wwarn

$(DOCS) : %.html : %
	rst2html $< $@

doc: $(DOCS) Ganeti/HTools/Version.hs
	rm -rf $(HDDIR)/*
	mkdir -p $(HDDIR)/Ganeti/HTools
	cp hscolour.css $(HDDIR)/Ganeti/HTools
	for file in $(HSRCS); do \
		HsColour -css -anchor \
		$$file > $(HDDIR)/Ganeti/HTools/`basename $$file .hs`.html ; \
	done<commit_msg>Allow overriding the ghc compiler used<commit_after>HPROGS = hbal hscan hail hspace
HALLPROGS = $(HPROGS) test
HSRCS := $(wildcard Ganeti/HTools/*.hs) $(wildcard Ganeti/*.hs)
HDDIR = apidoc
GHC := ghc

DOCS = README.html NEWS.html

HFLAGS = -O2 -Wall -Werror -fwarn-monomorphism-restriction -fwarn-tabs
HEXTRA =

HPCEXCL = --exclude Main --exclude Ganeti.HTools.QC

# Haskell rules

all: $(HPROGS)

$(HALLPROGS): %: %.hs Ganeti/HTools/Version.hs $(HSRCS) Makefile
	$(GHC) --make $(HFLAGS) $(HEXTRA) $@

test: HEXTRA=-fhpc -Wwarn

$(DOCS) : %.html : %
	rst2html $< $@

doc: $(DOCS) Ganeti/HTools/Version.hs
	rm -rf $(HDDIR)/*
	mkdir -p $(HDDIR)/Ganeti/HTools
	cp hscolour.css $(HDDIR)/Ganeti/HTools
	for file in $(HSRCS); do \
		HsColour -css -anchor \
		$$file > $(HDDIR)/Ganeti/HTools/`basename $$file .hs`.html ; \
	done
{'fraction_non_alphanumeric': 0.1763239875389408, 'fraction_numerical': 0.0024922118380062306, 'mean_word_length': 3.737463126843658, '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': '5224460', 'n_tokens_mistral': 723, 'n_tokens_neox': 672, 'n_words': 154}