<commit_before>include mldb/ext/gmsl/gmsl

TMPBIN ?= $(BIN)
LIB ?= $(BIN)

dollars=$$

SHELL := /bin/bash

ifneq ($(strip $(TERM)),)
    # we have a term
    ifeq ($(shell if [ $$(tput colors) -gt 7 ]; then echo "1"; fi;),1)

    ESC :=

    COLOR_RED :=$(ESC)[31m
    COLOR_GREEN :=$(ESC)[32m
    COLOR_YELLOW :=$(ESC)[33m
    COLOR_BLUE :=$(ESC)[34m
    COLOR_VIOLET :=$(ESC)[35m
    COLOR_CYAN :=$(ESC)[36m
    COLOR_RESET := $(ESC)[0m
    COLOR_BOLD :=$(ESC)[1m
    COLOR_DARK_GRAY := $(ESC)[1;30m
    endif

endif

ifeq ($(TERM),rxvt)

ESC :=

COLOR_RED :=$(ESC)[31m
COLOR_GREEN :=$(ESC)[32m
COLOR_YELLOW :=$(ESC)[33m
COLOR_BLUE :=$(ESC)[34m
COLOR_VIOLET :=$(ESC)[35m
COLOR_CYAN :=$(ESC)[36m
COLOR_RESET := $(ESC)[0m
COLOR_BOLD :=$(ESC)[1m
COLOR_DARK_GRAY := $(ESC)[1;30m

endif

ifneq ($(__BASH_MAKE_COMPLETION__),1)
-include .make_hash_cache

# Command to hash the name of a command.
NOTHING :=
SPACE := $(NOTHING) $(NOTHING)
TAB := $(NOTHING)	$(NOTHING)
DOLLAR := $$

hash_command2 = $(wordlist 1,1,$(shell echo $(strip $(1)) | md5sum))

hash_command1 = $(eval HASH:=$(call hash_command2,$(1)))$(shell echo $(1)_hash:=$(HASH) >> .make_hash_cache)$(eval $(1)_hash:=$(HASH))

command_key = $(subst =,_,$(subst $(SPACE),_,$(subst $(DOLLAR),_,$(subst \,,$(strip $(1))))))

hash_command = $(eval KEY=$(call command_key,$(1)))$(if $($(KEY)_hash),,$(call hash_command1,$(KEY)))$(if $($(KEY)_hash),,$(error hash_command1 didnt set variable $(KEY)_hash))$($(KEY)_hash)

endif

# arg 1: names
define include_sub_makes
$$(foreach name,$(1),$$(eval $$(call include_sub_make,$$(name))))<commit_msg>Fixed slow make due to re-hashing over and over (MLDB-ZZZZ)<commit_after>include mldb/ext/gmsl/gmsl

TMPBIN ?= $(BIN)
LIB ?= $(BIN)

dollars=$$

SHELL := /bin/bash

ifneq ($(strip $(TERM)),)
    # we have a term
    ifeq ($(shell if [ $$(tput colors) -gt 7 ]; then echo "1"; fi;),1)

    ESC :=

    COLOR_RED :=$(ESC)[31m
    COLOR_GREEN :=$(ESC)[32m
    COLOR_YELLOW :=$(ESC)[33m
    COLOR_BLUE :=$(ESC)[34m
    COLOR_VIOLET :=$(ESC)[35m
    COLOR_CYAN :=$(ESC)[36m
    COLOR_RESET := $(ESC)[0m
    COLOR_BOLD :=$(ESC)[1m
    COLOR_DARK_GRAY := $(ESC)[1;30m
    endif

endif

ifeq ($(TERM),rxvt)

ESC :=

COLOR_RED :=$(ESC)[31m
COLOR_GREEN :=$(ESC)[32m
COLOR_YELLOW :=$(ESC)[33m
COLOR_BLUE :=$(ESC)[34m
COLOR_VIOLET :=$(ESC)[35m
COLOR_CYAN :=$(ESC)[36m
COLOR_RESET := $(ESC)[0m
COLOR_BOLD :=$(ESC)[1m
COLOR_DARK_GRAY := $(ESC)[1;30m

endif

ifneq ($(__BASH_MAKE_COMPLETION__),1)
-include .make_hash_cache

# Command to hash the name of a command.
NOTHING :=
SPACE := $(NOTHING) $(NOTHING)
TAB := $(NOTHING)	$(NOTHING)
DOLLAR := $$
LPARAN:=(
RPARAN:=)
SEMICOLON:=;
QUOTE:="
#"  
# (previous line is for emacs)



hash_command2 = $(wordlist 1,1,$(shell echo $(strip $(1)) | md5sum))

hash_command1 = $(eval HASH:=$(call hash_command2,$(1)))$(shell echo $(1)_hash:=$(HASH) >> .make_hash_cache)$(eval $(1)_hash:=$(HASH))

command_key = $(subst $(RPARAN),_,$(subst $(LPARAN),_,$(subst $(SEMICOLON),_,$(subst $(QUOTE),_,$(subst =,_,$(subst $(SPACE),_,$(subst $(DOLLAR),_,$(subst \,,$(strip $(1))))))))))

hash_command = $(eval KEY=$(call command_key,$(1)))$(if $($(KEY)_hash),,$(warning hash cache miss on $(KEY))$(call hash_command1,$(KEY)))$(if $($(KEY)_hash),,$(error hash_command1 didnt set variable $(KEY)_hash))$($(KEY)_hash)

endif

# arg 1: names
define include_sub_makes
$$(foreach name,$(1),$$(eval $$(call include_sub_make,$$(name))))
{'fraction_non_alphanumeric': 0.23298429319371727, 'fraction_numerical': 0.031413612565445025, 'mean_word_length': 5.6647286821705425, 'pattern_counts': {'":': 0, '<': 3, '<?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': '78971', 'n_tokens_mistral': 1547, 'n_tokens_neox': 1447, 'n_words': 294}