<commit_before>CWD := $(shell pwd)
PHP_INCLUDE_PATH := $(shell echo '<?php echo get_include_path();'|php)
PHP := 'php -d include_path="$(CWD):$(PHP_INCLUDE_PATH)"'
PROVE := prove -r --exec $(PHP)
PACKAGEXML := base.xml
BUILDXML := package.xml
BUILDVAL := $(BUILDXML).validate

default:

.PHONY: test test-verbose package-validate install uninstall clean build-package-xml discover-channel

clean:
	rm $BUILDXML $BUILDXML.validate

build-package-xml:
	php build-package-xml $(PACKAGEXML) $(BUILDXML)

discover-channel:
	pear channel-discover onlinebuddies.github.com/pear || true

install-build-prereqs:
	pear channel-discover pear.vardump.org || true
	pear install vd/PEAR_PackageFileManager_Git

install: build-package-xml discover-channel uninstall
	pear install $(BUILDXML)

uninstall:
	pear uninstall OnlineBuddies/Modyllic

package: build-package-xml
	pear package $(BUILDXML)

package-validate: build-package-xml
	pear package-validate $(BUILDXML) | egrep -v 'Analyzing|Validation' > $(BUILDVAL)
	grep ^Warning: $(BUILDVAL) || true
	if grep ^Error: $(BUILDVAL); then exit 1; else exit 0; fi

test: package-validate
	$(PROVE) tests

test-verbose: package-validate
	$(PROVE) -v tests<commit_msg>We now distribute our own PEAR file manager helper<commit_after>CWD := $(shell pwd)
PHP_INCLUDE_PATH := $(shell echo '<?php echo get_include_path();'|php)
PHP := 'php -d include_path="$(CWD):$(PHP_INCLUDE_PATH)"'
PROVE := prove -r --exec $(PHP)
PACKAGEXML := base.xml
BUILDXML := package.xml
BUILDVAL := $(BUILDXML).validate

default:

.PHONY: test test-verbose package-validate install uninstall clean build-package-xml discover-channel

clean:
	rm $BUILDXML $BUILDXML.validate

build-package-xml:
	php build-package-xml $(PACKAGEXML) $(BUILDXML)

discover-channel:
	pear channel-discover onlinebuddies.github.com/pear || true

install-build-prereqs:
	pear install OnlineBuddies/PEAR_PackageFileManager_Gitrepoonly

install: build-package-xml discover-channel uninstall
	pear install $(BUILDXML)

uninstall:
	pear uninstall OnlineBuddies/Modyllic

package: build-package-xml
	pear package $(BUILDXML)

package-validate: build-package-xml
	pear package-validate $(BUILDXML) | egrep -v 'Analyzing|Validation' > $(BUILDVAL)
	grep ^Warning: $(BUILDVAL) || true
	if grep ^Error: $(BUILDVAL); then exit 1; else exit 0; fi

test: package-validate
	$(PROVE) tests

test-verbose: package-validate
	$(PROVE) -v tests
{'fraction_non_alphanumeric': 0.12676641729010807, 'fraction_numerical': 0.0016625103906899418, 'mean_word_length': 5.505405405405406, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, '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': '1899236', 'n_tokens_mistral': 824, 'n_tokens_neox': 806, 'n_words': 213}