<commit_before>THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH)); pwd)

GIT_COMMIT = $(shell git rev-parse --short HEAD)
GIT_STATUS = $(shell test -n "`git status --porcelain`" && echo "+CHANGES")

COMPONENTS = rprompter

BUILD_OPTIONS = -ldflags "-X rprompter/config.GitCommit $(GIT_COMMIT)$(GIT_STATUS) -X rprompter/config.BuiltBy $(shell whoami) -w"

#
# Build Targets, for development
#
run: | install
	bin/rprompter

install: | submodules
	GOPATH=$(THIS_DIR) go install $(BUILD_OPTIONS) rprompter

# Yes, I typo this often
isntall: | install

test: | submodules
	GOPATH=$(THIS_DIR) go test -i $(COMPONENTS)
	GOPATH=$(THIS_DIR) go test -v $(COMPONENTS) #| script/colorise_gotest_output.pl

#
# Format our packages
#
fmt:
	GOPATH=$(THIS_DIR) go fmt $(COMPONENTS)

#
# Doc, godoc is amazing
#
doc:
	# Amazinging, the godoc server starts before the browser does normally!
	GOPATH=$(THIS_DIR) godoc -http=:6060
	open "http://localhost:6060/pkg/rprompter/"

#
# Downloads and prepares submodules
#
submodules:
	git submodule update --init --recursive

#
# Cleans out build products
#
clean:
	find {bin,pkg} -mindepth 1 -not -name '.gitkeep' -delete

.PHONY: clean submodules fmt run install test<commit_msg>Disable submodules until needed<commit_after>THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH)); pwd)

GIT_COMMIT = $(shell git rev-parse --short HEAD)
GIT_STATUS = $(shell test -n "`git status --porcelain`" && echo "+CHANGES")

COMPONENTS = rprompter

BUILD_OPTIONS = -ldflags "-X rprompter/config.GitCommit $(GIT_COMMIT)$(GIT_STATUS) -X rprompter/config.BuiltBy $(shell whoami) -w"

#
# Build Targets, for development
#
run: | install
	bin/rprompter

install:
	GOPATH=$(THIS_DIR) go install $(BUILD_OPTIONS) rprompter

# Yes, I typo this often
isntall: | install

test:
	GOPATH=$(THIS_DIR) go test -i $(COMPONENTS)
	GOPATH=$(THIS_DIR) go test -v $(COMPONENTS) #| script/colorise_gotest_output.pl

#
# Format our packages
#
fmt:
	GOPATH=$(THIS_DIR) go fmt $(COMPONENTS)

#
# Doc, godoc is amazing
#
doc:
	# Amazinging, the godoc server starts before the browser does normally!
	GOPATH=$(THIS_DIR) godoc -http=:6060
	open "http://localhost:6060/pkg/rprompter/"

#
# Downloads and prepares submodules
#
# submodules:
	# git submodule update --init --recursive

#
# Cleans out build products
#
clean:
	find {bin,pkg} -mindepth 1 -not -name '.gitkeep' -delete

.PHONY: clean fmt run install test
{'fraction_non_alphanumeric': 0.13784954706577393, 'fraction_numerical': 0.0070894052776683735, 'mean_word_length': 5.033254156769596, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5635612', 'n_tokens_mistral': 989, 'n_tokens_neox': 938, 'n_words': 253}