<commit_before>################################################################################
# Basic configurations
################################################################################
verbose			?= n
debug			?= n

# The domain helper: one of [none, xcl, xl]
DOMLIB			?= none

DOM_NONE		:= n
DOM_XCL			:= n
DOM_XL			:= n
ifeq ($(DOMLIB),none)
DOM_NONE		:= y
else ifeq ($(DOMLIB),xcl)
DOM_XCL			:= y
else ifeq ($(DOMLIB),xl)
DOM_XL			:= y
else
$(error Invalid domain helper $(DOMLIB))
endif

ifneq (,$(filter $(DOMLIB),xcl xl))
ifndef XEN_ROOT
$(error "Define XEN_ROOT to build with DOMLIB=$(DOMLIB)")
endif
endif

XEN_VERSION := $(shell xl info | grep -E "(xen_major|xen_minor|xen_extra)" | \
	cut -d: -f2 | tr -d ' ' | tr -d '.' | tr '\n' '.' | \
	awk -F '.' '{ split($$3, a, "-"); printf "%01x%02x%02x", $$1, $$2, a[1]; }')


PYTHON_VERSION	?= 2.7

V8_SWIG			?= swig<commit_msg>build: Detect host and sources version<commit_after>################################################################################
# Basic configurations
################################################################################
verbose			?= n
debug			?= n

# The domain helper: one of [none, xcl, xl]
DOMLIB			?= none

DOM_NONE		:= n
DOM_XCL			:= n
DOM_XL			:= n
ifeq ($(DOMLIB),none)
DOM_NONE		:= y
else ifeq ($(DOMLIB),xcl)
DOM_XCL			:= y
else ifeq ($(DOMLIB),xl)
DOM_XL			:= y
else
$(error Invalid domain helper $(DOMLIB))
endif

ifneq (,$(filter $(DOMLIB),xcl xl))
ifndef XEN_ROOT
$(error "Define XEN_ROOT to build with DOMLIB=$(DOMLIB)")
endif
endif

XEN_HOST_VERSION := $(shell xl info | grep -E "(xen_major|xen_minor|xen_extra)" | \
	cut -d: -f2 | tr -d ' ' | tr -d '.' | tr '\n' '.' | \
	awk -F '.' '{ split($$3, a, "-"); printf "%01x%02x%02x", $$1, $$2, a[1]; }')

XEN_ROOT_VERSION := $(shell cd $(XEN_ROOT); make --no-print-directory -C xen xenversion | \
	awk -F '.' '{ split($$3, a, "-"); printf "%01x%02x%02x", $$1, $$2, a[1]; }')

define XEN_VERSION_ERR

Version mismatch between your host and the sources you are using:

host-xenversion=$(XEN_HOST_VERSION)
build-xenversion=$(XEN_ROOT_VERSION)

endef

ifneq (,$(filter $(DOMLIB),xcl xl))
ifneq ($(XEN_HOST_VERSION), $(XEN_ROOT_VERSION))
$(error $(XEN_VERSION_ERR))
endif
endif

XEN_VERSION := $(XEN_HOST_VERSION)

PYTHON_VERSION	?= 2.7

V8_SWIG			?= swig
{'fraction_non_alphanumeric': 0.30189491817398795, 'fraction_numerical': 0.01636520241171404, 'mean_word_length': 4.851385390428211, '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': '2379183', 'n_tokens_mistral': 948, 'n_tokens_neox': 859, 'n_words': 227}