<commit_before>
# try to determine the OS and architecture
MYOS := $(shell uname -s)
MACHINE := $(shell uname -m)
ifeq ($(MYOS), Linux)
    ARCH=linux
else ifeq ($(MYOS), FreeBSD)
    ARCH=freebsd
else ifeq ($(MYOS), Darwin)
    ARCH=osx
else ifeq ($(MYOS), CYGWIN_NT-5.1)
    ARCH=win
else ifeq ($(MYOS), MINGW32_NT-5.1)
    ARCH=win
else ifeq ($(MYOS), MINGW32_NT-6.1)
    ARCH=win
else ifeq ($(MYOS),)
  ifeq (${OS}, Windows_NT)
    ARCH=win
  else
    $(error "OS ${OS} unrecognized - please open an issue at https://github.com/nddrylliog/rock/issues")
  endif
endif
ifneq ($(ARCH), osx)
  ifeq ($(MACHINE), x86_64)
    ARCH:=${ARCH}64
  else ifeq (${PROCESSOR_ARCHITECTURE}, AMD64)
    ARCH:=${ARCH}64
  else
    ARCH:=${ARCH}32
  endif
endif
# this folder must contains libs/
ROCK_DIST?=.

# uncomment to link dynamically with the gc instead (e.g. -lgc)
GC_PATH?=${ROCK_DIST}/${ARCH}/

all:
	mkdir -p ${GC_PATH}
	cd sources && ./configure --enable-threads=posix --enable-thread-local-alloc && make # Note: see http://www.hpl.hp.com/personal/Hans_Boehm/gc/simple_example.html
	cp sources/.libs/libgc.a ${GC_PATH}<commit_msg>Avoiding colliding with ROCK_DIST, use system gc if present. Closes #325<commit_after>
# try to determine the OS and architecture
MYOS := $(shell uname -s)
MACHINE := $(shell uname -m)
ifeq ($(MYOS), Linux)
    ARCH=linux
else ifeq ($(MYOS), FreeBSD)
    ARCH=freebsd
else ifeq ($(MYOS), Darwin)
    ARCH=osx
else ifeq ($(MYOS), CYGWIN_NT-5.1)
    ARCH=win
else ifeq ($(MYOS), MINGW32_NT-5.1)
    ARCH=win
else ifeq ($(MYOS), MINGW32_NT-6.1)
    ARCH=win
else ifeq ($(MYOS),)
  ifeq (${OS}, Windows_NT)
    ARCH=win
  else
    $(error "OS ${OS} unrecognized - please open an issue at https://github.com/nddrylliog/rock/issues")
  endif
endif
ifneq ($(ARCH), osx)
  ifeq ($(MACHINE), x86_64)
    ARCH:=${ARCH}64
  else ifeq (${PROCESSOR_ARCHITECTURE}, AMD64)
    ARCH:=${ARCH}64
  else
    ARCH:=${ARCH}32
  endif
endif
# this folder must contains libs/
ROCK_LIBS_DIR?=.

# uncomment to link dynamically with the gc instead (e.g. -lgc)
GC_PATH?=${ROCK_LIBS_DIR}/${ARCH}/
GC_PREFIX?=/usr/lib/

SYSTEM_GC_PRESENT?=$(shell nm ${GC_PREFIX}/libgc.a | grep GC_pthread_create)

all:
	mkdir -p ${GC_PATH}
ifdef SYSTEM_GC_PRESENT
	@echo "Using system libgc"
	cp /usr/lib/libgc.a ${GC_PATH}
else
	@echo "No system libgc or it doesn't support threads, building our own"
	cd sources && ./configure --enable-threads=posix --enable-thread-local-alloc && make
	cp sources/.libs/libgc.a ${GC_PATH}
endif
{'fraction_non_alphanumeric': 0.15705765407554673, 'fraction_numerical': 0.01868787276341948, 'mean_word_length': 3.982178217821782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, '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': '1400901', 'n_tokens_mistral': 1054, 'n_tokens_neox': 966, 'n_words': 263}