<commit_before># make magic not needed
export MAKEFLAGS += --no-builtin-rules
.SUFFIXES:

ifndef ROOT_DIR
export ROOT_DIR=$(shell readlink -m $(shell pwd)/../..)
endif

ifndef BUILD_DIR
include $(ROOT_DIR)/include/includes.mk
endif

include $(ROOT_DIR)/include/generators.mk

.PHONY: default
default: pants

include $(ROOT_DIR)/include/time.mk

export PANTS_DIR=$(CACHE_DIR)/pants
# ant version could be independent for pants
export ANT_IVY_PATH=$(CACHE_DIR)/ant_ivy/ant_ivy$(ANT_VERSION)/bin

.PHONY: pants
pants: pants$(PANTS_DEFAULT_VERSION)

.PHONY: version
version: $(PANTS_DIR)/pants
	@cd $(PANTS_DIR); touch pants.ini
	@cd $(PANTS_DIR); $(PANTS_DIR)/pants --version

.NOTPARALLEL: pants%
.PHONY: pants%
pants%: $(CONFIGURED_BUILD_ROOT)/pants%/BUILD $(PANTS_DIR)/pants $(CONFIGURED_BUILD_ROOT)/pants%/pants.ini% $(TIME) $(REPORTS_DIR)
	$(info ******* pants start)
	# Do one throw-away run to ensure all tools are shaded.
	@cd $(CONFIGURED_BUILD_ROOT)/pants$*; $(PANTS_DIR)/pants test :test
	@cd $(CONFIGURED_BUILD_ROOT)/pants$*; $(PANTS_DIR)/pants clean-all
	cd $(CONFIGURED_BUILD_ROOT)/pants$*; $(call TIME_CMD,$@) $(PANTS_DIR)/pants test :test


# pants insists on being installed via virtualenv, version configured in project
.PRECIOUS: $(PANTS_DIR)/pants
$(PANTS_DIR)/pants:
	@mkdir -p $(PANTS_DIR)
	@cd $(PANTS_DIR); curl -s -O https://pantsbuild.github.io/setup/pants
	@chmod u+x $(PANTS_DIR)/pants

# make sure correct pants_version configured in project workspace
.PHONY: $(CONFIGURED_BUILD_ROOT)/pants%/pants.ini%
$(CONFIGURED_BUILD_ROOT)/pants%/pants.ini%: $(CONFIGURED_BUILD_ROOT)/pants%/BUILD
# intentionally avoiding sed -i because it is not cross compatible
	@sed 's/pants_version.*$$/pants_version: $*/g'  $(CONFIGURED_BUILD_ROOT)/pants$*/pants.ini >  $(CONFIGURED_BUILD_ROOT)/pants$*/pants.ini.tmp && mv  $(CONFIGURED_BUILD_ROOT)/pants$*/pants.ini.tmp  $(CONFIGURED_BUILD_ROOT)/pants$*/pants.ini


.PRECIOUS: $(CONFIGURED_BUILD_ROOT)/pants%/BUILD
$(CONFIGURED_BUILD_ROOT)/pants%/BUILD: $(CONFIGURED_BUILD_SOURCE)
	@python $(SCRIPTS_DIR)/apply-templates.py $(BUILDTEMPLATES_DIR)/$(BUILD_DEFINITIONS)/pants $(CONFIGURED_BUILD_ROOT)/pants$* --subprojectnum=$(SUBPROJECT_NUM) --filenum=$(FILE_NUM)<commit_msg>Pants: warm up + cleanup only once<commit_after># make magic not needed
export MAKEFLAGS += --no-builtin-rules
.SUFFIXES:

ifndef ROOT_DIR
export ROOT_DIR=$(shell readlink -m $(shell pwd)/../..)
endif

ifndef BUILD_DIR
include $(ROOT_DIR)/include/includes.mk
endif

include $(ROOT_DIR)/include/generators.mk

.PHONY: default
default: pants

include $(ROOT_DIR)/include/time.mk

export PANTS_DIR=$(CACHE_DIR)/pants
# ant version could be independent for pants
export ANT_IVY_PATH=$(CACHE_DIR)/ant_ivy/ant_ivy$(ANT_VERSION)/bin

.PHONY: pants
pants: pants$(PANTS_DEFAULT_VERSION)

.PHONY: version
version: $(PANTS_DIR)/pants
	@cd $(PANTS_DIR); touch pants.ini
	@cd $(PANTS_DIR); $(PANTS_DIR)/pants --version

.NOTPARALLEL: pants%
.PHONY: pants%
pants%: $(CONFIGURED_BUILD_ROOT)/pants%/BUILD $(PANTS_DIR)/pants $(CONFIGURED_BUILD_ROOT)/pants%/pants.ini $(TIME) $(CONFIGURED_BUILD_ROOT)/pants%/.pants.d $(REPORTS_DIR)
	$(info ******* pants start)
	cd $(CONFIGURED_BUILD_ROOT)/pants$*; $(call TIME_CMD,$@) $(PANTS_DIR)/pants test :test


.PRECIOUS: $(PANTS_DIR)/pants%/.pants.d
$(CONFIGURED_BUILD_ROOT)/pants%/.pants.d:
# Do one throw-away run to ensure all tools are shaded.
	@cd $(CONFIGURED_BUILD_ROOT)/pants$*; $(PANTS_DIR)/pants test :test
	@cd $(CONFIGURED_BUILD_ROOT)/pants$*; $(PANTS_DIR)/pants clean-all

# pants insists on being installed via virtualenv, version configured in project
.PRECIOUS: $(PANTS_DIR)/pants
$(PANTS_DIR)/pants:
	@mkdir -p $(PANTS_DIR)
	@cd $(PANTS_DIR); curl -s -O https://pantsbuild.github.io/setup/pants
	@chmod u+x $(PANTS_DIR)/pants


# make sure correct pants_version configured in project workspace
.PRECIOUS: $(CONFIGURED_BUILD_ROOT)/pants%/pants.ini
$(CONFIGURED_BUILD_ROOT)/pants%/pants.ini: $(CONFIGURED_BUILD_ROOT)/pants%/BUILD
# intentionally avoiding sed -i because it is not cross compatible
	@sed 's/pants_version.*$$/pants_version: $*/g'  $(CONFIGURED_BUILD_ROOT)/pants$*/pants.ini >  $(CONFIGURED_BUILD_ROOT)/pants$*/pants.ini.tmp && mv  $(CONFIGURED_BUILD_ROOT)/pants$*/pants.ini.tmp  $(CONFIGURED_BUILD_ROOT)/pants$*/pants.ini


.PRECIOUS: $(CONFIGURED_BUILD_ROOT)/pants%/BUILD
$(CONFIGURED_BUILD_ROOT)/pants%/BUILD: $(CONFIGURED_BUILD_SOURCE)
	@python $(SCRIPTS_DIR)/apply-templates.py $(BUILDTEMPLATES_DIR)/$(BUILD_DEFINITIONS)/pants $(CONFIGURED_BUILD_ROOT)/pants$* --subprojectnum=$(SUBPROJECT_NUM) --filenum=$(FILE_NUM)
{'fraction_non_alphanumeric': 0.15742552728854098, 'fraction_numerical': 0.0, 'mean_word_length': 6.198748043818466, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3279260', 'n_tokens_mistral': 1782, 'n_tokens_neox': 1759, 'n_words': 334}