<commit_before>.PHONY: all fetch unpack patch build install clean distclean

PREFIX?=/usr
DESTDIR?=
VERSION?=1.0
FETCH?=curl

all: build

fetch: ppl-$(VERSION).tar.gz
unpack: ppl-$(VERSION)/
patch: unpack
prepare: ppl-$(VERSION)/
	mkdir build/
	@touch $@

configure: prepare
	cd build && ../ppl-$(VERSION)/configure --prefix=$(PREFIX)
	@touch $@

build: configure
	$(MAKE) -C build

install: build
	$(MAKE) -C build install DESTDIR=$(DESTDIR)

clean:
	$(RM) prepare configure
	$(RM) -r build/
	$(RM) -r ppl-$(VERSION)/

distclean: clean
	$(RM) ppl-$(VERSION).tar.gz

ppl-$(VERSION).tar.gz:
	$(FETCH) http://bugseng.com/products/ppl/download/ftp/releases/$(VERSION)/ppl-$(VERSION).tar.gz > $@

ppl-$(VERSION)/: ppl-$(VERSION).tar.gz
	tar xzf $<
<commit_msg>Implement build from git source tree for base/ppl<commit_after>.PHONY: all fetch unpack patch build install clean distclean

PREFIX?=/usr
DESTDIR?=
VERSION?=1.0
FETCH?=curl

ifeq ($(VERSION),GIT)
GIT_REVISION ?= master
endif

all: build

fetch: ppl-$(VERSION).tar.gz
unpack: ppl-$(VERSION)/
patch: unpack
prepare: ppl-$(VERSION)/
	mkdir build/
	@touch $@

configure: prepare
	cd build && ../ppl-$(VERSION)/configure --prefix=$(PREFIX)
	@touch $@

build: configure
	$(MAKE) -C build

install: build
	$(MAKE) -C build install DESTDIR=$(DESTDIR)

clean:
	$(RM) prepare configure
	$(RM) -r build/
ifneq ($(VERSION),GIT)
	$(RM) -r ppl-$(VERSION)/
endif

distclean: clean
	$(RM) ppl-$(VERSION).tar.gz
	$(RM) -r ppl-GIT/

ifeq ($(VERSION),GIT)
.PHONY: ppl-GIT/
ppl-GIT/:
	[ -d $@ ] && (git --git-dir=$@/.git pull) || (git clone git://git.cs.unipr.it/ppl/ppl.git $@)
	git --git-dir=$@/.git pull
	git --git-dir=$@/.git checkout $(GIT_REVISION)
	cd $@ && (autoreconf || (automake --add-missing && autoreconf))
else
ppl-$(VERSION).tar.gz:
	$(FETCH) http://bugseng.com/products/ppl/download/ftp/releases/$(VERSION)/ppl-$(VERSION).tar.gz > $@

ppl-$(VERSION)/: ppl-$(VERSION).tar.gz
	tar xzf $<
endif

{'fraction_non_alphanumeric': 0.20473251028806586, 'fraction_numerical': 0.00205761316872428, 'mean_word_length': 4.065104166666667, 'pattern_counts': {'":': 0, '<': 5, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2048506', 'n_tokens_mistral': 809, 'n_tokens_neox': 766, 'n_words': 176}