<commit_before>#change these to something suitable if you are not running in a vagrant box.
USER=vagrant
INSTALL=/vagrant

#current versions as of 12/2015
PCRE=pcre-8.38
APR=apr-1.5.2
APR_UTIL=apr-util-1.5.4
HTTPD=httpd-2.4.18

#the urls (if the versions change you should check these)
PCRE_URL=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${PCRE}.tar.gz
APR_URL=http://download.nextag.com/apache/apr/${APR}.tar.gz
APR_UTIL_URL=http://shinyfeather.com/apr/${APR_UTIL}.tar.gz
HTTPD_URL=http://apache.claz.org/httpd/${HTTPD}.tar.gz


all: check_sanity build

build: ${PCRE}_build ${APR}_build ${APR_UTIL}_build ${HTTPD}_build

${PCRE}.tar.gz:
	wget ${PCRE_URL}

${PCRE}.tar: ${PCRE}.tar.gz
	gunzip -k ${PCRE}.tar.gz

${PCRE}: ${PCRE}.tar
	tar xvf ${PCRE}.tar

${PCRE}_build: ${PCRE}
	mkdir -p ${PCRE}_build                                      && \
	cd ${PCRE}_build                                            && \
	CC=wllvm ../${PCRE}/configure --prefix=${INSTALL}/${PCRE}   && \
	CC=wllvm make 	                                            && \
	cd  .libs                                                   && \
	extract-bc libpcre.so                                       && \
	cp libpcre.so.bc ../../                                     && \
	cd  ..                                                      && \
	make install                                                   


${APR}.tar.gz:
	wget ${APR_URL}

${APR}.tar: ${APR}.tar.gz
	gunzip -k ${APR}.tar.gz

${APR}: ${APR}.tar
	tar xvf ${APR}.tar

${APR}_build: ${APR}
	mkdir -p ${APR}_build                                    && \
	cd ${APR}_build                                          && \
	CC=wllvm ../${APR}/configure --prefix=${INSTALL}/${APR}  && \
	CC=wllvm make                                            && \
	cd .libs                                                 && \
	extract-bc libapr-1.so                                   && \
	cp libapr-1.so.bc ../../                                 && \
	cd ..                                                    && \
	make install                                                

${APR_UTIL}.tar.gz:
	wget ${APR_UTIL_URL}

${APR_UTIL}.tar: ${APR_UTIL}.tar.gz
	gunzip -k ${APR_UTIL}.tar.gz

${APR_UTIL}: ${APR_UTIL}.tar
	tar xvf ${APR_UTIL}.tar

${APR_UTIL}_build: ${APR_UTIL}
	mkdir -p ${APR_UTIL}_build                                         && \
	cd ${APR_UTIL}_build                                               && \
	CC=wllvm ../${APR_UTIL}/configure --prefix=${INSTALL}/${APR_UTIL}     \
                                          --with-apr=${INSTALL}/${APR}     && \
	CC=wllvm make                                                      && \
	cd .libs                                                           && \
	extract-bc libaprutil-1.so                                         && \
	cp libaprutil-1.so.bc ../../                                       && \
	cd ..                                                              && \
	make install                                                          


${HTTPD}.tar.gz:
	wget ${HTTPD_URL}

${HTTPD}.tar: ${HTTPD}.tar.gz
	gunzip -k ${HTTPD}.tar.gz

${HTTPD}: ${HTTPD}.tar
	tar xvf ${HTTPD}.tar

${HTTPD}_build: ${HTTPD}
	mkdir -p ${HTTPD}_build                                                       && \
	cd  ${HTTPD}_build                                                            && \
	CC=wllvm ../${HTTPD}/configure --prefix=${INSTALL}/${HTTPD}                      \
                                       --with-pcre=${INSTALL}/${PCRE}/bin/pcre-config    \
                                       --with-apr=${INSTALL}/${APR}                      \
				       --with-apr-util=${INSTALL}/${APR_UTIL}         && \
	CC=wllvm make                                                                 && \
	extract-bc httpd                                                              && \
	cp httpd.bc ../                                                               && \
	make install                                                                     


clean:
	rm -rf *~  *_build  previrt httpd


very_clean: clean
	rm -rf ${HTTPD} ${APR_UTIL} ${APR} ${PCRE}<commit_msg>libexpatso.so.bc also gets extracted from the build of apr-util.<commit_after>#change these to something suitable if you are not running in a vagrant box.
USER=vagrant
INSTALL=/vagrant

#current versions as of 12/2015
PCRE=pcre-8.38
APR=apr-1.5.2
APR_UTIL=apr-util-1.5.4
HTTPD=httpd-2.4.18

#the urls (if the versions change you should check these)
PCRE_URL=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${PCRE}.tar.gz
APR_URL=http://download.nextag.com/apache/apr/${APR}.tar.gz
APR_UTIL_URL=http://shinyfeather.com/apr/${APR_UTIL}.tar.gz
HTTPD_URL=http://apache.claz.org/httpd/${HTTPD}.tar.gz


all: check_sanity build

build: ${PCRE}_build ${APR}_build ${APR_UTIL}_build ${HTTPD}_build

${PCRE}.tar.gz:
	wget ${PCRE_URL}

${PCRE}.tar: ${PCRE}.tar.gz
	gunzip -k ${PCRE}.tar.gz

${PCRE}: ${PCRE}.tar
	tar xvf ${PCRE}.tar

${PCRE}_build: ${PCRE}
	mkdir -p ${PCRE}_build                                      && \
	cd ${PCRE}_build                                            && \
	CC=wllvm ../${PCRE}/configure --prefix=${INSTALL}/${PCRE}   && \
	CC=wllvm make 	                                            && \
	cd  .libs                                                   && \
	extract-bc libpcre.so                                       && \
	cp libpcre.so.bc ../../                                     && \
	cd  ..                                                      && \
	make install                                                   


${APR}.tar.gz:
	wget ${APR_URL}

${APR}.tar: ${APR}.tar.gz
	gunzip -k ${APR}.tar.gz

${APR}: ${APR}.tar
	tar xvf ${APR}.tar

${APR}_build: ${APR}
	mkdir -p ${APR}_build                                    && \
	cd ${APR}_build                                          && \
	CC=wllvm ../${APR}/configure --prefix=${INSTALL}/${APR}  && \
	CC=wllvm make                                            && \
	cd .libs                                                 && \
	extract-bc libapr-1.so                                   && \
	cp libapr-1.so.bc ../../                                 && \
	cd ..                                                    && \
	make install                                                

${APR_UTIL}.tar.gz:
	wget ${APR_UTIL_URL}

${APR_UTIL}.tar: ${APR_UTIL}.tar.gz
	gunzip -k ${APR_UTIL}.tar.gz

${APR_UTIL}: ${APR_UTIL}.tar
	tar xvf ${APR_UTIL}.tar

${APR_UTIL}_build: ${APR_UTIL}
	mkdir -p ${APR_UTIL}_build                                         && \
	cd ${APR_UTIL}_build                                               && \
	CC=wllvm ../${APR_UTIL}/configure --prefix=${INSTALL}/${APR_UTIL}     \
                                          --with-apr=${INSTALL}/${APR}     && \
	CC=wllvm make                                                      && \
	cd .libs                                                           && \
	extract-bc libaprutil-1.so                                         && \
	cp libaprutil-1.so.bc ../../                                       && \
	cd ..                                                              && \
	cd xml/expat/.libs                                                 && \
	extract-bc libexpat.so                                             && \
	mv libexpat.so.bc ../../../../                                     && \
	cd ../../..                                                        && \
	make install                                                          


${HTTPD}.tar.gz:
	wget ${HTTPD_URL}

${HTTPD}.tar: ${HTTPD}.tar.gz
	gunzip -k ${HTTPD}.tar.gz

${HTTPD}: ${HTTPD}.tar
	tar xvf ${HTTPD}.tar

${HTTPD}_build: ${HTTPD}
	mkdir -p ${HTTPD}_build                                                       && \
	cd  ${HTTPD}_build                                                            && \
	CC=wllvm ../${HTTPD}/configure --prefix=${INSTALL}/${HTTPD}                      \
                                       --with-pcre=${INSTALL}/${PCRE}/bin/pcre-config    \
                                       --with-apr=${INSTALL}/${APR}                      \
				       --with-apr-util=${INSTALL}/${APR_UTIL}         && \
	CC=wllvm make                                                                 && \
	extract-bc httpd                                                              && \
	cp httpd.bc ../                                                               && \
	make install                                                                     


clean:
	rm -rf *~  *_build  previrt httpd


very_clean: clean
	rm -rf ${HTTPD} ${APR_UTIL} ${APR} ${PCRE}
{'fraction_non_alphanumeric': 0.1413358027549485, 'fraction_numerical': 0.005324690357680287, 'mean_word_length': 0.8430034129692833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 123, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3720277', 'n_tokens_mistral': 2496, 'n_tokens_neox': 2417, 'n_words': 410}