<commit_before># optional features
HAVE_ACL=0
HAVE_SELINUX=0

# vis version
# we have no tags in git, so just use revision count an hash for now
GITREVCOUNT = "$(shell git rev-list --count master 2>/dev/null)"
GITHASH = "$(shell git log -1 --format="%h" 2>/dev/null)"
ifeq (${GITREVCOUNT},)
	VERSION = devel
else
	VERSION = "0.r${GITREVCOUNT}.g${GITHASH}"
endif

# Customize below to fit your system

PREFIX ?= /usr/local
MANPREFIX = ${PREFIX}/share/man

INCS = -I.
LIBS = -lc -lncursesw -ltermkey

OS = $(shell uname)

ifeq (${OS},Linux)
	ifeq (${HAVE_SELINUX},1)<commit_msg>update version handling to work with tags or without git<commit_after># optional features
HAVE_ACL=0
HAVE_SELINUX=0

# vis version
# try to get a tag and hash first
GITHASH = $(shell git log -1 --format='%h' 2>/dev/null)
GITTAG = $(shell git describe --abbrev=0 --tags 2>/dev/null)
ifneq ($(GITTAG),)
	# we have a tag and revcount from there
	GITREVCOUNT = $(shell git rev-list --count ${GITTAG}.. 2>/dev/null)
	VERSION = ${GITTAG}.r${GITREVCOUNT}.g${GITHASH}
else ifneq ($(GITHASH),)
	# we have no tags in git, so just use revision count an hash for now
	GITREVCOUNT = $(shell git rev-list --count master)
	VERSION = 0.r${GITREVCOUNT}.g${GITHASH}
else
	# this is used when no git is available, e.g. for release tarball
	VERSION = 0.0.0
endif

# Customize below to fit your system

PREFIX ?= /usr/local
MANPREFIX = ${PREFIX}/share/man

INCS = -I.
LIBS = -lc -lncursesw -ltermkey

OS = $(shell uname)

ifeq (${OS},Linux)
	ifeq (${HAVE_SELINUX},1)
{'fraction_non_alphanumeric': 0.14595660749506903, 'fraction_numerical': 0.012491781722550954, 'mean_word_length': 4.056478405315614, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '7091376', 'n_tokens_mistral': 595, 'n_tokens_neox': 573, 'n_words': 188}