<commit_before>SRC_DIR  = src
TEST_DIR = test
TOOL_DIR = tools

all: build

install:  
	mkdir -p $(to)
	mkdir -p $(to)/tools
	cp -f tools/alloy4.jar $(to)/tools
	cp -f tools/alloy4.2.jar $(to)/tools
	cabal install --bindir=$(to)
	cp -f README.md $(to)/clafer-README.md
	cp -f tools/XsdCheck.class $(to)/tools
	cp -f -r spl_configurator/py_src $(to)/
	cp -f  spl_configurator/clafer_moo.sh $(to)/

build:
	$(MAKE) -C $(TOOL_DIR)
	cabal install --only-dependencies
	cabal configure
	cabal build
	cp dist/build/clafer/clafer .

# build Schema.hs from ClaferIG.xsd, call after .xsd changed
Schema.hs:
	$(MAKE) -C $(SRC_DIR) Schema.hs

# build Css.hs from clafer.css, call after .css changed
Css.hs:
	$(MAKE) -C $(SRC_DIR) Css.hs

# enable profiler
prof:
	$(MAKE) -C $(SRC_DIR)
	$(MAKE) -C $(TOOL_DIR)
	ghc -isrc -prof -auto-all -rtsopts -O -outputdir dist/build --make src/clafer -o clafer

.PHONY : test

test:
	$(MAKE) -C $(TEST_DIR) test

reg:
	$(MAKE) -C $(TEST_DIR) reg

newVersion:
	$(MAKE) -C $(SRC_DIR) newVersion

clean:
	rm -f clafer
	rm -rf dist
	$(MAKE) -C $(TEST_DIR) clean
	$(MAKE) -C $(SRC_DIR) clean
	$(MAKE) -C $(TOOL_DIR) clean
	find . -type f -name '*.o' -print0 | xargs -0 rm -f
	find . -type f -name '*.hi' -print0 | xargs -0 rm -f
	find . -type f -name '*~' -print0 | xargs -0 rm -f
<commit_msg>copy `alloy4moo.jar` during installation<commit_after>SRC_DIR  = src
TEST_DIR = test
TOOL_DIR = tools

all: build

install:  
	mkdir -p $(to)
	mkdir -p $(to)/tools
	cp -f tools/alloy4.jar $(to)/tools
	cp -f tools/alloy4.2.jar $(to)/tools
	cp -f tools/alloy4moo.jar $(to)/tools
	cabal install --bindir=$(to)
	cp -f README.md $(to)/clafer-README.md
	cp -f tools/XsdCheck.class $(to)/tools
	cp -f -r spl_configurator/py_src $(to)/
	cp -f  spl_configurator/clafer_moo.sh $(to)/

build:
	$(MAKE) -C $(TOOL_DIR)
	cabal install --only-dependencies
	cabal configure
	cabal build
	cp dist/build/clafer/clafer .

# build Schema.hs from ClaferIG.xsd, call after .xsd changed
Schema.hs:
	$(MAKE) -C $(SRC_DIR) Schema.hs

# build Css.hs from clafer.css, call after .css changed
Css.hs:
	$(MAKE) -C $(SRC_DIR) Css.hs

# enable profiler
prof:
	$(MAKE) -C $(SRC_DIR)
	$(MAKE) -C $(TOOL_DIR)
	ghc -isrc -prof -auto-all -rtsopts -O -outputdir dist/build --make src/clafer -o clafer

.PHONY : test

test:
	$(MAKE) -C $(TEST_DIR) test

reg:
	$(MAKE) -C $(TEST_DIR) reg

newVersion:
	$(MAKE) -C $(SRC_DIR) newVersion

clean:
	rm -f clafer
	rm -rf dist
	$(MAKE) -C $(TEST_DIR) clean
	$(MAKE) -C $(SRC_DIR) clean
	$(MAKE) -C $(TOOL_DIR) clean
	find . -type f -name '*.o' -print0 | xargs -0 rm -f
	find . -type f -name '*.hi' -print0 | xargs -0 rm -f
	find . -type f -name '*~' -print0 | xargs -0 rm -f

{'fraction_non_alphanumeric': 0.16939078751857356, 'fraction_numerical': 0.007429420505200594, 'mean_word_length': 3.092705167173252, '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': '3149131', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1171, 'n_words': 343}