<commit_before># routines and rules to print some helpful stuff


#$(warning MAKECMDGOALS = $(MAKECMDGOALS))

# print some help and exit
ifeq ($(firstword $(MAKECMDGOALS)),help)
do-nothing=1

.PHONY: help
help:
	@echo "LK build system quick help\n" \
	"Individual projects are built into a build-<project> directory\n" \
	"Output binary is located at build-<project>/lk.bin\n" \
	"Environment or command line variables controlling build:\n" \
	"PROJECT = <project name>\n" \
	"TOOLCHAIN_PREFIX = <absolute path to toolchain or relative path with prefix>\n" \
	"\n" \
	"Special make targets:\n" \
	"make help: This help\n" \
	"make list: List of buildable projects\n" \
	"make clean: cleans build of current project\n" \
	"make spotless: removes all build directories\n" \
	"make <project>: try to build project named <project>\n" \
	"\n" \
	"Examples:\n" \
	"PROJECT=testproject make\n" \
	"PROJECT=testproject make clean\n" \
	"make testproject\n" \
	"make testproject clean\n" \
	"\n" \
	"output will be in build-testproject/\n" \

endif

# list projects
ifeq ($(firstword $(MAKECMDGOALS)),list)
do-nothing=1

# get a list of all the .mk files in the top level project directories
PROJECTS:=$(basename $(strip $(foreach d,$(LKINC),$(wildcard $(d)/project/*.mk))))
PROJECTS:=$(shell basename $(PROJECTS))

.PHONY: list
list:<commit_msg>[make] fix 'make list' to use basename properly<commit_after># routines and rules to print some helpful stuff


#$(warning MAKECMDGOALS = $(MAKECMDGOALS))

# print some help and exit
ifeq ($(firstword $(MAKECMDGOALS)),help)
do-nothing=1

.PHONY: help
help:
	@echo "LK build system quick help\n" \
	"Individual projects are built into a build-<project> directory\n" \
	"Output binary is located at build-<project>/lk.bin\n" \
	"Environment or command line variables controlling build:\n" \
	"PROJECT = <project name>\n" \
	"TOOLCHAIN_PREFIX = <absolute path to toolchain or relative path with prefix>\n" \
	"\n" \
	"Special make targets:\n" \
	"make help: This help\n" \
	"make list: List of buildable projects\n" \
	"make clean: cleans build of current project\n" \
	"make spotless: removes all build directories\n" \
	"make <project>: try to build project named <project>\n" \
	"\n" \
	"Examples:\n" \
	"PROJECT=testproject make\n" \
	"PROJECT=testproject make clean\n" \
	"make testproject\n" \
	"make testproject clean\n" \
	"\n" \
	"output will be in build-testproject/\n" \

endif

# list projects
ifeq ($(firstword $(MAKECMDGOALS)),list)
do-nothing=1

# get a list of all the .mk files in the top level project directories
PROJECTS:=$(basename $(strip $(foreach d,$(LKINC),$(wildcard $(d)/project/*.mk))))
PROJECTS:=$(shell basename -a $(PROJECTS))

.PHONY: list
list:
{'fraction_non_alphanumeric': 0.14422722242714867, 'fraction_numerical': 0.0014754703061600886, 'mean_word_length': 4.1169811320754715, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4280067', 'n_tokens_mistral': 969, 'n_tokens_neox': 933, 'n_words': 305}