curl -Sso $@ "http://php.net/releases/index.php?json&version=5&max=-1"
$(srcdir)/php-$(PHP_VERSION)/configure: | $(srcdir)/php-versions.json
- curl -Ss $(PHP_MIRROR)/php-$(PHP_VERSION).tar.bz2 | tar xj -C $(srcdir)
+ if test $(PHP_VERSION) = "master"; then \
+ cd $(srcdir) && git clone --depth 1 -b master https://github.com/php/php-src php-master && cd php-master && ./buildconf; \
+ else \
+ curl -Ss $(PHP_MIRROR)/php-$(PHP_VERSION).tar.bz2 | tar xj -C $(srcdir); \
+ fi
$(srcdir)/php-$(PHP_VERSION)/Makefile: $(srcdir)/php-$(PHP_VERSION)/configure | $(srcdir)/php-versions.json
cd $(srcdir)/php-$(PHP_VERSION) && ./configure -C --prefix=$(prefix)
.PHONY: php
test: php
REPORT_EXIT_STATUS=1 $(bindir)/php run-tests.php -q -p $(bindir)/php --set-timeout 300 --show-diff tests
+
+pharext/%: $(PECL_INI) php | $(srcdir)/../%.ext.phar
+ for phar in $|; do $(bindir)/php $$phar --prefix=$(prefix) --ini=$(PECL_INI); done