<commit_before>#! /bin/sh

# directory with clucene binaries and header
#CLUCENEDIR=$HOME/testinstall
#CLUCENESRCDIR=.
PREFIX=$HOME/testinstall

rm -rf autom4te.cache configure COPYING depcomp INSTALL install-sh Makefile.in \
	missing aclocal.m4 debug ltmain.sh config.guess config.sub config.log \
	config.status Makefile libtool 2> /dev/null
find -name Makefile.in -exec rm {} \;

if [[ -n $1 ]]; then
	TARGET=$1
	if [ $TARGET != "dist" ] && [ $TARGET != "check" ]; then
		exit;
	fi
fi

libtoolize --ltdl --force --copy && \
aclocal -I m4 && \
autoconf && \
automake --add-missing || exit;

if [ test $TARGET == "dist" ]; then
	./configure && make dist-bzip2
elif [ test $TARGET == "release" ]; then
	mkdir release && \
	cd release && \
	CXXFLAGS="-Wall -O3" CPPFLAGS=-I$CLUCENEDIR/include \
	LDFLAGS=-L$CLUCENEDIR/lib ../configure --enable-debug=no && \
	make
else
	mkdir debug && \
	cd debug && \
	CXXFLAGS="-Wall -O0 -g3" ../configure --enable-debug=full \
            --prefix=$PREFIX --with-clucene=$CLUCENEDIR && \
	make && \
	make check
fi<commit_msg>Fix autobuild script command order.<commit_after>#! /bin/sh

# directory with clucene binaries and header
#CLUCENEDIR=$HOME/testinstall
#CLUCENESRCDIR=.
PREFIX=$HOME/testinstall

rm -rf autom4te.cache configure COPYING depcomp INSTALL install-sh Makefile.in \
	missing aclocal.m4 debug ltmain.sh config.guess config.sub config.log \
	config.status Makefile libtool libltdl 2> /dev/null
find -name Makefile.in -exec rm {} \;

if [[ -n $1 ]]; then
	TARGET=$1
	if [ $TARGET != "dist" ] && [ $TARGET != "check" ]; then
		exit;
	fi
fi

aclocal -I m4 && \
libtoolize --ltdl --force --copy && \
autoconf && \
automake --add-missing || exit;

if [ test $TARGET == "dist" ]; then
	./configure && make dist-bzip2
elif [ test $TARGET == "release" ]; then
	mkdir release && \
	cd release && \
	CXXFLAGS="-Wall -O3" CPPFLAGS=-I$CLUCENEDIR/include \
	LDFLAGS=-L$CLUCENEDIR/lib ../configure --enable-debug=no && \
	make
else
	mkdir debug && \
	cd debug && \
	CXXFLAGS="-Wall -O0 -g3" ../configure --enable-debug=full \
            --prefix=$PREFIX --with-clucene=$CLUCENEDIR && \
	make && \
	make check
fi
{'fraction_non_alphanumeric': 0.16325581395348837, 'fraction_numerical': 0.009302325581395349, 'mean_word_length': 3.160541586073501, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1136648', 'n_tokens_mistral': 798, 'n_tokens_neox': 780, 'n_words': 208}