<commit_before>bin := $(ROOT)/bin
lib := $(ROOT)/lib

tools := $(patsubst ./%,%,$(shell find . -maxdepth 1 ! -path . -type d))

install: $(tools)

$(tools): %: $(bin)/%

define declare_tool
$(bin)/$(1): $(shell find $(1)/src -name *.rs)
	@echo "Installing $(1)..."
	@mkdir -p $(bin)
	@mkdir -p $(lib)
	@cd $(1) && $(LIBRARY_VARIABLE)="$(LIBRARY_VARIABLE):$(RUST_PATH)/lib" $(CARGO) build --release
	@cp $(1)/target/release/$(1) $(bin)/
	@find $(1)/target/release/build -name lib*.$(LIBRARY_SUFFIC)* -exec cp {} $(lib)/ \;
endef

$(foreach tool,$(tools),$(eval $(call declare_tool,$(tool))))

clean:
	@rm -rf $(addsuffix /target,$(tools))
	@rm -f $(bin)/* $(lib)/*

.PHONY: install clean $(tools)
<commit_msg>Clean up a Makefile<commit_after>bin := $(ROOT)/bin
lib := $(ROOT)/lib

tools := $(patsubst ./%,%,$(shell find . -maxdepth 1 ! -path . -type d))

install: $(tools)

$(tools): %: $(bin)/%

define declare_tool
$(bin)/$(1): $(shell find $(1)/src -name *.rs)
	@echo "Installing $(1)..."
	@cd $(1) && $(LIBRARY_VARIABLE)="$(LIBRARY_VARIABLE):$(RUST_PATH)/lib" $(CARGO) build --release
	@cp $(1)/target/release/$(1) $(bin)/
	@find $(1)/target/release/build -name lib*.$(LIBRARY_SUFFIC)* -exec cp {} $(lib)/ \;
endef

$(foreach tool,$(tools),$(eval $(call declare_tool,$(tool))))

clean:
	@rm -rf $(addsuffix /target,$(tools))
	@rm -f $(bin)/* $(lib)/*

.PHONY: install clean $(tools)

{'fraction_non_alphanumeric': 0.2741702741702742, 'fraction_numerical': 0.011544011544011544, 'mean_word_length': 4.334615384615384, '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': '2072447', 'n_tokens_mistral': 561, 'n_tokens_neox': 544, 'n_words': 133}