<commit_before>##
# Go Toolchain Programs
# Based of GNU's
# \{
#

##
# m.in/toolchain/go/program-prefix
# Prefix of programs of the Go toolchain.
#
# Default Value:
# null
#
# Usage:
# - docker run ... :)
# - Programs can be prefixed depending on how they were generated.
#   By default, native programs are not prefixed while a cross-compilation
#   toolchain is prefixed by its target.
#
m.in/toolchain/go/program-prefix :=

##
# m.in/toolchain/gnu/program-suffix
# Suffix of programs of the Go toolchain.
#
# Default Value:
# null
#
# Usage:
# Some programs can be suffixed depending on how they were generated. By
# default, programs are not suffixed.
#
m.in/toolchain/go/program-suffix :=

##
# m.in/toolchain/go/program(name)
# Helper macro to prefix and suffix a program `name`.
#
define m.in/toolchain/go/program =
$(strip
$(m.in/toolchain/go/program-prefix)$(m.in/argv/1)\
$(m.in/toolchain/go/program-suffix))
endef


##
# Go Toolchain Programs
# To be completed as soon as needed.
# \{
#

## m.in/toolchain/go/bin/go
define m.in/toolchain/go/bin/go =
$(call m.in/toolchain/go/program, $(m.in/toolchain/go/program/go))
endef
m.in/toolchain/go/program/go   := go

## m.in/toolchain/go/bin/go-test
define m.in/toolchain/go/bin/go-test =
$(m.in/toolchain/go/bin/go) test
endef

## m.in/toolchain/go/bin/go-build
define m.in/toolchain/go/bin/go-build =
$(m.in/toolchain/go/bin/go) build
endef

## m.in/toolchain/go/bin/go-install
define m.in/toolchain/go/bin/go-install =
$(m.in/toolchain/go/bin/go) install
endef

## \}


##
# Global Flags
# \{
#

##
# Go command option flags.
# Default Value:
# null
#
# Example:
# ```
# m.in/toolchain/go/goflags := -v -x
# ```
#
m.in/toolchain/go/goflags :=

## \}

##
# Toolchain Recipes
# \{
#

##
# m.in/toolchain/go/recipe/go/build(flags?)
# Build packages. Flags may be optionally added for this recipe, along
# with global flags `m.in/toolchain/go/goflags`.
#
define m.in/toolchain/go/recipe/build =
$(m.in/toolchain/go/bin/go-build) $(m.in/toolchain/go/goflags) -o $@ $(strip $1) \
                            $(call m.in/transaction/implementations, $@)
endef

##
# m.in/toolchain/go/recipe/go/test(flags?)
# Test packages. Flags may be optionally added to the recipe, along
# with global flags `m.in/toolchain/go/goflags`.
#
define m.in/toolchain/go/recipe/test =
$(m.in/toolchain/go/bin/go-test) $(m.in/toolchain/go/goflags) $(strip $1) \
                            $(call m.in/transaction/implementations, $@)
endef

##
# m.in/toolchain/go/recipe/go/install(flags?)
# Install packages. Flags may be optionally added to the recipe, along
# with global flags `m.in/toolchain/go/goflags`. The file is also touched
# so that its creation time (which is tracked by make) is updated because
# go tools don't.
#
define m.in/toolchain/go/recipe/install =
$(m.in/toolchain/go/bin/go-install) $(m.in/toolchain/go/goflags) $(strip $1) \
                            $(call m.in/transaction/implementations, $@) &&  \
touch $@
endef

##
# m.in/toolchain/go/recipe/go/tool(tool, args?)<commit_msg>go: cache package dependencies to accelerate builds<commit_after>##
# Go Toolchain Programs
# Based of GNU's
# \{
#

##
# m.in/toolchain/go/program-prefix
# Prefix of programs of the Go toolchain.
#
# Default Value:
# null
#
# Usage:
# - docker run ... :)
# - Programs can be prefixed depending on how they were generated.
#   By default, native programs are not prefixed while a cross-compilation
#   toolchain is prefixed by its target.
#
m.in/toolchain/go/program-prefix :=

##
# m.in/toolchain/gnu/program-suffix
# Suffix of programs of the Go toolchain.
#
# Default Value:
# null
#
# Usage:
# Some programs can be suffixed depending on how they were generated. By
# default, programs are not suffixed.
#
m.in/toolchain/go/program-suffix :=

##
# m.in/toolchain/go/program(name)
# Helper macro to prefix and suffix a program `name`.
#
define m.in/toolchain/go/program =
$(strip
$(m.in/toolchain/go/program-prefix)$(m.in/argv/1)\
$(m.in/toolchain/go/program-suffix))
endef


##
# Go Toolchain Programs
# To be completed as soon as needed.
# \{
#

## m.in/toolchain/go/bin/go
define m.in/toolchain/go/bin/go =
$(call m.in/toolchain/go/program, $(m.in/toolchain/go/program/go))
endef
m.in/toolchain/go/program/go   := go

## m.in/toolchain/go/bin/go-test
define m.in/toolchain/go/bin/go-test =
$(m.in/toolchain/go/bin/go) test
endef

## m.in/toolchain/go/bin/go-build
define m.in/toolchain/go/bin/go-build =
$(m.in/toolchain/go/bin/go) build
endef

## m.in/toolchain/go/bin/go-install
define m.in/toolchain/go/bin/go-install =
$(m.in/toolchain/go/bin/go) install
endef

## \}


##
# Global Flags
# \{
#

##
# Go command option flags.
# Default Value:
# null
#
# Example:
# ```
# m.in/toolchain/go/goflags := -v -x
# ```
#
m.in/toolchain/go/goflags :=

## \}

##
# Toolchain Recipes
# \{
#

##
# m.in/toolchain/go/recipe/build(flags?)
# Build packages. Flags may be optionally added for this recipe, along
# with global flags `m.in/toolchain/go/goflags`.
#
define m.in/toolchain/go/recipe/build =
$(m.in/toolchain/go/bin/go-build) $(m.in/toolchain/go/goflags) -i -o $@ $(strip $1) \
                            $(call m.in/transaction/implementations, $@)
endef

##
# m.in/toolchain/go/recipe/go/test(flags?)
# Test packages. Flags may be optionally added to the recipe, along
# with global flags `m.in/toolchain/go/goflags`.
#
define m.in/toolchain/go/recipe/test =
$(m.in/toolchain/go/bin/go-test) $(m.in/toolchain/go/goflags) $(strip $1) \
                            $(call m.in/transaction/implementations, $@)
endef

##
# m.in/toolchain/go/recipe/go/install(flags?)
# Install packages. Flags may be optionally added to the recipe, along
# with global flags `m.in/toolchain/go/goflags`. The file is also touched
# so that its creation time (which is tracked by make) is updated because
# go tools don't.
#
define m.in/toolchain/go/recipe/install =
$(m.in/toolchain/go/bin/go-install) $(m.in/toolchain/go/goflags) $(strip $1) \
                            $(call m.in/transaction/implementations, $@) &&  \
touch $@
endef

##
# m.in/toolchain/go/recipe/go/tool(tool, args?)
{'fraction_non_alphanumeric': 0.16497710922171355, 'fraction_numerical': 0.0013080444735120995, 'mean_word_length': 3.2186206896551726, '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': '1742504', 'n_tokens_mistral': 2347, 'n_tokens_neox': 2291, 'n_words': 500}