<commit_before>.PHONY: build test npm clean purge help

ALL_LIB := $(shell find src -type d)
ALL_LIB := $(ALL_LIB:src/%=lib/%)

ALL_CDENT := $(shell find src -name *.cdent.uni)
ALL_JS := $(ALL_CDENT:src/%.cdent.uni=lib/%.js)

default: help

help:
	@echo ''
	@echo 'Makefile targets:'
	@echo ''
	@echo '    make build  - Compile stuff'
	@echo '    make test   - Run the tests'
	@echo ''
	@echo '    make npm    - Make a Node.js package'
	@echo ''
	@echo '    make clean  - Clean up'
	@echo '    make help   - Get Help'
	@echo ''

build: $(ALL_LIB) $(ALL_JS)
	@make -C test $@

lib/%.js: src/%.cdent.uni
	coffee --compile -p $< > $@

test xtest: build
	coffee -e '(require "./test/lib/Test/Harness").run()' $@

npm: clean build
	mkdir -p $@/test
	cp -r \
	    LICENSE* \
	    README* \
	    doc \
	    lib \
	    test \
	    $@/
	cp -r test/lib $@/test/
	./bin/cdent-package-yaml-converter package.yaml > $@/package.json

clean purge:
	rm -fr node_modules lib npm
	@make -C test $@

$(ALL_LIB):
	mkdir -p $@<commit_msg>Updated Makefile to reflect the filename change.<commit_after>.PHONY: build test npm clean purge help

ALL_LIB := $(shell find src -type d)
ALL_LIB := $(ALL_LIB:src/%=lib/%)

ALL_CDENT := $(shell find src -name *.cd.uni)
ALL_JS := $(ALL_CDENT:src/%.cd.uni=lib/%.js)

default: help

help:
	@echo ''
	@echo 'Makefile targets:'
	@echo ''
	@echo '    make build  - Compile stuff'
	@echo '    make test   - Run the tests'
	@echo ''
	@echo '    make npm    - Make a Node.js package'
	@echo ''
	@echo '    make clean  - Clean up'
	@echo '    make help   - Get Help'
	@echo ''

build: $(ALL_LIB) $(ALL_JS)
	@make -C test $@

lib/%.js: src/%.cd.uni
	coffee --compile -p $< > $@

test xtest: build
	coffee -e '(require "./test/lib/Test/Harness").run()' $@

npm: clean build
	mkdir -p $@/test
	cp -r \
	    LICENSE* \
	    README* \
	    doc \
	    lib \
	    test \
	    $@/
	cp -r test/lib $@/test/
	./bin/cdent-package-yaml-converter package.yaml > $@/package.json

clean purge:
	rm -fr node_modules lib npm
	@make -C test $@

$(ALL_LIB):
	mkdir -p $@
{'fraction_non_alphanumeric': 0.17524271844660194, 'fraction_numerical': 0.0, 'mean_word_length': 2.493220338983051, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5050871', 'n_tokens_mistral': 861, 'n_tokens_neox': 808, 'n_words': 232}