X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=Makefile;h=97123171dfb4b5ec27ce5aca3ca61cde702b1b74;hb=2d7406d5c003e208d14a6a755e0971e009e57d00;hp=88d36a9f74cd3890841cdacdd46881edf1eef310;hpb=01c99bb9ee4a8030742ce230c43333252ebf6835;p=m6w6%2Fpecl-ci diff --git a/Makefile b/Makefile index 88d36a9..9712317 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,9 @@ PECL_SONAME ?= $(if $(shell echo $(PECL) | cut -d: -f2),$(shell echo $(PECL) | c 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 | $(srcdir)/php-version.php $(PHP)) +PHP_VERSION_MAJOR = $(firstword $(subst ., ,$(PHP))) +PHP_VERSIONS_JSON = $(srcdir)/php-versions$(PHP_VERSION_MAJOR).json +PHP_VERSION ?= $(shell test -e $(PHP_VERSIONS_JSON) && cat $(PHP_VERSIONS_JSON) | $(srcdir)/php-version.php $(PHP)) .SUFFIXES: @@ -41,7 +43,7 @@ clean: @if test -d $(srcdir)/php-$(PHP_VERSION); then cd $(srcdir)/php-$(PHP_VERSION); make distclean || true; fi .PHONY: check -check: $(srcdir)/php-versions.json +check: $(PHP_VERSIONS_JSON) @if test -z "$(PHP)"; then echo "No php version specified, e.g. PHP=5.6"; exit 1; fi .PHONY: reconf @@ -51,8 +53,8 @@ reconf: check $(srcdir)/php-$(PHP_VERSION)/configure .PHONY: php php: check $(bindir)/php -$(srcdir)/php-versions.json: $(srcdir)/php-version.php - curl -Sso $@ "http://php.net/releases/index.php?json&version=5&max=-1" +$(PHP_VERSIONS_JSON): $(srcdir)/php-version.php + curl -Sso $@ "http://php.net/releases/index.php?json&version=$(PHP_VERSION_MAJOR)&max=-1" $(srcdir)/php-$(PHP_VERSION)/configure: | $(srcdir)/php-versions.json if test $(PHP_VERSION) = "master"; then \ @@ -105,7 +107,7 @@ $(srcdir)/pecl-$(PECL_EXTENSION)/Makefile: $(srcdir)/pecl-$(PECL_EXTENSION)/conf $(srcdir)/pecl-$(PECL_EXTENSION)/.libs/$(PECL_SONAME).so: $(srcdir)/pecl-$(PECL_EXTENSION)/Makefile cd $(srcdir)/pecl-$(PECL_EXTENSION) && make -j $(JOBS) || make - + $(extdir)/$(PECL_SONAME).so: $(srcdir)/pecl-$(PECL_EXTENSION)/.libs/$(PECL_SONAME).so cd $(srcdir)/pecl-$(PECL_EXTENSION) && make install @@ -128,4 +130,4 @@ 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 $$phar --prefix=$(prefix) --ini=$(PECL_INI); done + for phar in $|; do $(bindir)/php $$phar --prefix=$(prefix) --ini=$(PECL_INI); done