<commit_before>ifneq ($(findstring i686,$(TARGET)),)
FLAGS=-m32
else
FLAGS=-m64
endif

ifeq ($(findstring mingw,$(TARGET)),)
SEP=:
else
SEP=;
endif

OPTS = -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF \
       -DBUILD_CLAR=OFF \
       -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_EXAMPLES=OFF \
       -DCMAKE_C_FLAGS="$(FLAGS) -fPIC"

export CMAKE_PREFIX_PATH := $(DEP_LIBSSH2_STATIC_SYS_OUT_DIR)$(SEP)$(CMAKE_PREFIX_PATH)

all:
	cmake libgit2 -G "Unix Makefiles" -B"$(OUT_DIR)" $(OPTS)
	make -C "$(OUT_DIR)"<commit_msg>Use pkg-config to detect a system libgit2<commit_after>ifneq ($(findstring i686,$(TARGET)),)
FLAGS=-m32
else
FLAGS=-m64
endif

ifeq ($(findstring mingw,$(TARGET)),)
SEP=:
else
SEP=;
endif

OPTS = -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF \
       -DBUILD_CLAR=OFF \
       -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_EXAMPLES=OFF \
       -DCMAKE_C_FLAGS="$(FLAGS) -fPIC"

export CMAKE_PREFIX_PATH := $(DEP_LIBSSH2_STATIC_SYS_OUT_DIR)$(SEP)$(CMAKE_PREFIX_PATH)


# If libgit2 exists locally, don't do anything. Otherwise go and build curl
all:
	pkg-config --atleast-version=0.21.0 libgit2 || $(MAKE) build

build:
	cmake libgit2 -G "Unix Makefiles" -B"$(OUT_DIR)" $(OPTS)
	make -C "$(OUT_DIR)" -j$(NUM_JOBS)
{'fraction_non_alphanumeric': 0.15447822514379622, 'fraction_numerical': 0.020542317173377157, 'mean_word_length': 4.970588235294118, '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': '6236962', 'n_tokens_mistral': 541, 'n_tokens_neox': 503, 'n_words': 96}