export
-PHP = 5.6
+PHP ?= 5.6
JOBS ?= 2
PHP_MIRROR ?= http://us1.php.net/distributions/
-prefix ?= $(HOME)
-prefix += /job-$(TRAVIS_JOB_NUMBER)
+prefix ?= $(HOME)/job-$(TRAVIS_JOB_NUMBER)
exec_prefix ?= $(prefix)
bindir = $(exec_prefix)/bin
srcdir := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
PECL_VERSION ?= $(shell echo $(PECL) | cut -d: -f3 -s)
PECL_INI = $(with_config_file_scan_dir)/pecl.ini
-PHP_VERSION ?= $(shell test -e $(srcdir)/php-versions.json && cat $(srcdir)/php-versions.json | /usr/bin/php $(srcdir)/php-version.php $(PHP))
+PHP_VERSION ?= $(shell test -e $(srcdir)/php-versions.json && cat $(srcdir)/php-versions.json | $(srcdir)/php-version.php $(PHP))
.PHONY: all php check clean reconf pecl ext test
.SUFFIXES:
php: check $(bindir)/php
$(srcdir)/php-versions.json: $(srcdir)/php-version.php
- curl -Sso $@ http://php.net/releases/active.php
+ 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)
grep -q extension=$(PECL_SONAME).so $(PECL_INI) || echo extension=$(PECL_SONAME).so >> $(PECL_INI)
ext: pecl-check $(srcdir)/pecl-$(PECL_EXTENSION) pecl
+ $(srcdir)/check-packagexml.php package.xml
test: php
REPORT_EXIT_STATUS=1 NO_INTERACTION=1 $(bindir)/php run-tests.php -p $(bindir)/php --show-diff tests