Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 49 lines (36 sloc) 1.154 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
CWD := $(shell pwd)
PHP_INCLUDE_PATH := $(shell echo '<?php echo get_include_path();'|php)
PHP := 'php -d include_path="$(CWD)/lib:$(PHP_INCLUDE_PATH)"'
PROVE := prove -r --exec $(PHP)
PACKAGEXML := base.xml
BUILDXML := package.xml

default:

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

clean:
rm -rf $(BUILDXML) tmp coverage

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

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

install-build-prereqs: discover-channel
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)

test:
$(PROVE) test

test-cover:
rm -rf tmp/test coverage
TEST_COVERAGE=1 $(PROVE) -v test
phpcov --merge --html coverage tmp/test/coverage
rm -rf tmp/test

unit-test-cover:
rm -rf tmp/test coverage
TEST_COVERAGE=1 $(PROVE) -v test/unit
phpcov --merge --html coverage tmp/test/coverage
rm -rf tmp/test

test-verbose:
$(PROVE) -v test
Something went wrong with that request. Please try again.