<commit_before>
#
# the directory that this makefile (anonrules.mk) is in -- relative to the orignal
# directory in which make was invoked $(CURDIR)
#
anon.this_make_dir:=$(dir $(lastword $(MAKEFILE_LIST)))

#
# Root directory into which temp .o files will be placed
#
ifeq (,$(anon.INTERMEDIATE_DIR))
 anon.INTERMEDIATE_DIR:=obj
 $(info anon.INTERMEDIATE_DIR not set, so defaulting to $(CURDIR)/$(anon.INTERMEDIATE_DIR))
 $(info To remove this message set anon.INTERMEDIATE_DIR = something prior to including anonrules.mk)
endif

#
# Root directory into which final executables will be placed
#
ifeq (,$(anon.OUT_DIR))
 anon.OUT_DIR:=out
 $(info anon.OUT_DIR not set, so defaulting to $(CURDIR)/$(anon.OUT_DIR))
 $(info To remove this message set anon.OUT_DIR = something prior to including anonrules.mk)
endif

#
# Default configuration is 'release'
#
CONFIG?=release

#
# default value for "verbose output" is off
#
V?=0

#
# a few tools that we are silent about when verbose is off
#
ifneq (0,$(V))
 anon.mkdir=mkdir
 anon.touch=touch
else
 anon.mkdir=@mkdir
 anon.touch=@touch
endif

#
# Strategy for only calling mkdir on output directories once.
# We put a file named "dir.stamp" in each of those directories
# and then put an "order only" prerequesite to this file in the
# list of each file to compile.
#
%dir.stamp :
	$(anon.mkdir) -p $(@D)
	$(anon.touch) $@

#
# Convert a source path to an object file path.
#
# $1 = Source Name
#
anon.src_to_obj=$(anon.INTERMEDIATE_DIR)/$(CONFIG)/$(basename $(patsubst ./%,%,$(subst ..,__,$1))).o

#
# Convert a source path to a dependency file path.
#
# $1 = Source Name
#
anon.src_to_dep=$(anon.INTERMEDIATE_DIR)/$(CONFIG)/$(basename $(patsubst ./%,%,$(subst ..,__,$1))).d
#
# Convert a (re)source path to it's equivalent auto_gen file
#
anon.resrc_to_auto_gen=$(anon.INTERMEDIATE_DIR)/auto_gen/rez/$(patsubst ./%,%,$(subst ..,__,$1)).cpp

#
# Tool to either display short-form (when verbose is off) or
# full command line (when verbose is on) for some tool being
# run as part of a recipe.
#
# $1 = (fully path-qualified, if necessary) tool to run
# $2 = arguments passed to that tool
# $3 = short display-form of the arguments -- frequently just the target file name
#
ifneq (0,$(V))<commit_msg>auto_gen resource path now includes CONFIG variable<commit_after>
#
# the directory that this makefile (anonrules.mk) is in -- relative to the orignal
# directory in which make was invoked $(CURDIR)
#
anon.this_make_dir:=$(dir $(lastword $(MAKEFILE_LIST)))

#
# Root directory into which temp .o files will be placed
#
ifeq (,$(anon.INTERMEDIATE_DIR))
 anon.INTERMEDIATE_DIR:=obj
 $(info anon.INTERMEDIATE_DIR not set, so defaulting to $(CURDIR)/$(anon.INTERMEDIATE_DIR))
 $(info To remove this message set anon.INTERMEDIATE_DIR = something prior to including anonrules.mk)
endif

#
# Root directory into which final executables will be placed
#
ifeq (,$(anon.OUT_DIR))
 anon.OUT_DIR:=out
 $(info anon.OUT_DIR not set, so defaulting to $(CURDIR)/$(anon.OUT_DIR))
 $(info To remove this message set anon.OUT_DIR = something prior to including anonrules.mk)
endif

#
# Default configuration is 'release'
#
CONFIG?=release

#
# default value for "verbose output" is off
#
V?=0

#
# a few tools that we are silent about when verbose is off
#
ifneq (0,$(V))
 anon.mkdir=mkdir
 anon.touch=touch
else
 anon.mkdir=@mkdir
 anon.touch=@touch
endif

#
# Strategy for only calling mkdir on output directories once.
# We put a file named "dir.stamp" in each of those directories
# and then put an "order only" prerequesite to this file in the
# list of each file to compile.
#
%dir.stamp :
	$(anon.mkdir) -p $(@D)
	$(anon.touch) $@

#
# Convert a source path to an object file path.
#
# $1 = Source Name
#
anon.src_to_obj=$(anon.INTERMEDIATE_DIR)/$(CONFIG)/$(basename $(patsubst ./%,%,$(subst ..,__,$1))).o

#
# Convert a source path to a dependency file path.
#
# $1 = Source Name
#
anon.src_to_dep=$(anon.INTERMEDIATE_DIR)/$(CONFIG)/$(basename $(patsubst ./%,%,$(subst ..,__,$1))).d
#
# Convert a (re)source path to it's equivalent auto_gen file
#
anon.resrc_to_auto_gen=$(anon.INTERMEDIATE_DIR)/auto_gen/rez/$(CONFIG)/$(patsubst ./%,%,$(subst ..,__,$1)).cpp

#
# Tool to either display short-form (when verbose is off) or
# full command line (when verbose is on) for some tool being
# run as part of a recipe.
#
# $1 = (fully path-qualified, if necessary) tool to run
# $2 = arguments passed to that tool
# $3 = short display-form of the arguments -- frequently just the target file name
#
ifneq (0,$(V))
{'fraction_non_alphanumeric': 0.1343612334801762, 'fraction_numerical': 0.004845814977973568, 'mean_word_length': 4.4975786924939465, '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': '5418808', 'n_tokens_mistral': 1562, 'n_tokens_neox': 1533, 'n_words': 535}