<commit_before>#
# Copyright (c) 2004-2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
#
# This program is distributed in the hope that it will be useful, but
# without any warranty; without even the implied warranty of merchantability
# or fitness for a particular purpose. See the Common Public License for
# full details.
#

SUBDIRS = epdb_embedded

python_files=$(wildcard *.py)
python_modules=elf.so misc.so cstreams.so SHA256_nonstandard.so
wrapper_libs=filename_wrapper.so
wrapper_objs=filename_wrapper.o
elfmodule_objs=elf.o
sha256module_objs=SHA256_nonstandard.o
miscmodule_objs=misc.o
cstreamsmodule_objs=cstreams.o numstream.o streamset.o stringstream.o
generated_files=$(elfmodule_objs) $(miscmodule_objs) $(cstreamsmodule_objs) $(python_modules) $(wrapper_libs) $(wrapper_objs) $(sha256module_objs)
dist_files = $(python_files) elf.c misc.c cstreams.c numstream.c streamset.c \
             stringstream.c cstreams.h filename_wrapper.c SHA256_nonstandard.c Makefile
libelf = $(shell \
if [ -x /usr/bin/pkg-config ] && /usr/bin/pkg-config --exists libelf; then \
    pkg-config --cflags --libs libelf; \
elif [ -d /usr/include/libelf-lgpl ]; then \
    echo "-I/usr/include/libelf-lgpl -lelf-lgpl"; \
elif [ -d ${SYSROOT}/usr/include/libelf-lgpl ]; then \
    echo "-I${SYSROOT}/usr/include/libelf-lgpl -lelf-lgpl"; \
elif [ -d /usr/include/libelf ] && grep 'GNU Library General Public' /usr/include/libelf/libelf.h >/dev/null; then\
    echo "-I/usr/include/libelf -Lelf-lgpl"; \
elif [ -d ${SYSROOT}/usr/include/libelf ] && grep 'GNU Library General Public' ${SYSROOT}/usr/include/libelf/libelf.h >/dev/null; then\
    echo "-I${SYSROOT}/usr/include/libelf -Lelf-lgpl"; \
else \
    echo 'No appropriate libelf found' >&2 ;\
fi)


all: default-subdirs $(python_modules) $(wrapper_libs)

elf.o: elf.c
	if [ -z "$(libelf)" ] ; then \
	    echo 'Stopping build due to missing libelf' ; exit 1 ; fi
	$(CC) $(CFLAGS) $(libelf) -c -o $@ $^

elf.so: $(elfmodule_objs)
	$(CC) $(LDFLAGS) -shared -o $@ $< $(libelf)

SHA256.o: SHA256_nonstandard.c
	$(CC) $(CFLAGS) -fno-strict-aliasing -DNDEBUG -fwrapv -O3 -Wstrict-prototypes -c -o $@ $^
<commit_msg>fix typo in libelf discovery<commit_after>#
# Copyright (c) 2004-2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
#
# This program is distributed in the hope that it will be useful, but
# without any warranty; without even the implied warranty of merchantability
# or fitness for a particular purpose. See the Common Public License for
# full details.
#

SUBDIRS = epdb_embedded

python_files=$(wildcard *.py)
python_modules=elf.so misc.so cstreams.so SHA256_nonstandard.so
wrapper_libs=filename_wrapper.so
wrapper_objs=filename_wrapper.o
elfmodule_objs=elf.o
sha256module_objs=SHA256_nonstandard.o
miscmodule_objs=misc.o
cstreamsmodule_objs=cstreams.o numstream.o streamset.o stringstream.o
generated_files=$(elfmodule_objs) $(miscmodule_objs) $(cstreamsmodule_objs) $(python_modules) $(wrapper_libs) $(wrapper_objs) $(sha256module_objs)
dist_files = $(python_files) elf.c misc.c cstreams.c numstream.c streamset.c \
             stringstream.c cstreams.h filename_wrapper.c SHA256_nonstandard.c Makefile
libelf = $(shell \
if [ -x /usr/bin/pkg-config ] && /usr/bin/pkg-config --exists libelf; then \
    pkg-config --cflags --libs libelf; \
elif [ -d /usr/include/libelf-lgpl ]; then \
    echo "-I/usr/include/libelf-lgpl -lelf-lgpl"; \
elif [ -d ${SYSROOT}/usr/include/libelf-lgpl ]; then \
    echo "-I${SYSROOT}/usr/include/libelf-lgpl -lelf-lgpl"; \
elif [ -d /usr/include/libelf ] && grep 'GNU Library General Public' /usr/include/libelf/libelf.h >/dev/null; then\
    echo "-I/usr/include/libelf -lelf"; \
elif [ -d ${SYSROOT}/usr/include/libelf ] && grep 'GNU Library General Public' ${SYSROOT}/usr/include/libelf/libelf.h >/dev/null; then\
    echo "-I${SYSROOT}/usr/include/libelf -lelf"; \
else \
    echo 'No appropriate libelf found' >&2 ;\
fi)


all: default-subdirs $(python_modules) $(wrapper_libs)

elf.o: elf.c
	if [ -z "$(libelf)" ] ; then \
	    echo 'Stopping build due to missing libelf' ; exit 1 ; fi
	$(CC) $(CFLAGS) $(libelf) -c -o $@ $^

elf.so: $(elfmodule_objs)
	$(CC) $(LDFLAGS) -shared -o $@ $< $(libelf)

SHA256.o: SHA256_nonstandard.c
	$(CC) $(CFLAGS) -fno-strict-aliasing -DNDEBUG -fwrapv -O3 -Wstrict-prototypes -c -o $@ $^

{'fraction_non_alphanumeric': 0.13876878731727404, 'fraction_numerical': 0.014823965410747375, 'mean_word_length': 4.003089598352214, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1957338', 'n_tokens_mistral': 1799, 'n_tokens_neox': 1692, 'n_words': 462}