X-Git-Url: https://git.m6w6.name/?p=m6w6%2Ftravis-pecl;a=blobdiff_plain;f=Makefile;h=4a903a800030c45581df06f9fd58e99cff648477;hp=2ccac0ff127512df00e8b031555fd9abe9df53e6;hb=HEAD;hpb=126f0d23ed321e2a40cb689b78ca6022ac6d3276 diff --git a/Makefile b/Makefile index 2ccac0f..4a903a8 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ export -PHP ?= 7.3 +PHP ?= 7.4 JOBS ?= 2 -PHP_MIRROR ?= http://php.net/distributions/ +PHP_MIRROR ?= https://php.net/distributions/ TMPDIR ?= /tmp makdir := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) @@ -14,7 +14,7 @@ prefix ?= $(TMPDIR)/php-$(PHP)-$(shell env |grep -E '^with_|^enable_' | tr -c '[ endif exec_prefix ?= $(prefix) bindir = $(exec_prefix)/bin -srcdir := $(prefix)/src +srcdir = $(prefix)/src ifdef TRAVIS_BUILD_DIR curdir ?= $(TRAVIS_BUILD_DIR) else @@ -62,9 +62,10 @@ versions: $(PHP_RELEASES) $(PHP_RELEASES): $(makdir)/php-version-url-dist.php $(makdir)/php-version-url-qa.php | $(srcdir) cd $(makdir) && printf "master\tmaster\t%s/fetch-master.sh\n" $$(pwd) >$@ - curl -Ss "http://php.net/releases/index.php?json&version=7&max=-1" | $(makdir)/php-version-url-dist.php >>$@ - curl -Ss "http://php.net/releases/index.php?json&version=5&max=-1" | $(makdir)/php-version-url-dist.php >>$@ - curl -Ss "http://qa.php.net/api.php?type=qa-releases&format=json" | $(makdir)/php-version-url-qa.php >>$@ + curl -sSL "https://php.net/releases/index.php?json&version=8&max=-1" | $(makdir)/php-version-url-dist.php >>$@ + curl -sSL "https://php.net/releases/index.php?json&version=7&max=-1" | $(makdir)/php-version-url-dist.php >>$@ + curl -sSL "https://php.net/releases/index.php?json&version=5&max=-1" | $(makdir)/php-version-url-dist.php >>$@ + curl -sSL "https://qa.php.net/api.php?type=qa-releases&format=json" | $(makdir)/php-version-url-qa.php >>$@ ## -- PHP @@ -75,6 +76,7 @@ clean: .PHONY: check check: $(PHP_RELEASES) @if test -z "$(PHP)"; then echo "No php version specified, e.g. PHP=5.6"; exit 1; fi + @if test -z "$(PHP_VERSION)"; then echo "No PHP version akin to $(PHP) available"; exit 1; fi if test -d $(srcdir)/php-$(PHP_VERSION)/.git; then cd $(srcdir)/php-$(PHP_VERSION)/; git pull; fi .PHONY: reconf @@ -129,12 +131,11 @@ $(PECL_DIR)/config.m4: cd $(PECL_DIR); \ git pull; \ else \ - git clone -b $(PECL_VERSION) \ - $$(dirname $$(git remote get-url $$(git remote)))/$(PECL_EXTENSION) $(PECL_DIR); \ + git clone https://github.com/$(PECL_EXTENSION) $(PECL_DIR); \ fi; \ else \ mkdir -p $(PECL_DIR); \ - curl -Ss $(PECL_MIRROR)/$(PECL_EXTENSION)$(if $(PECL_VERSION),/$(PECL_VERSION)) \ + curl -LSs $(PECL_MIRROR)/$(PECL_EXTENSION)$(if $(PECL_VERSION),/$(PECL_VERSION)) \ | tar xz --strip-components 1 -C $(PECL_DIR); \ fi @@ -165,9 +166,14 @@ ext: pecl-check pecl $(makdir)/check-packagexml.php package.xml .PHONY: test +test: TESTS ?= tests test: php - REPORT_EXIT_STATUS=1 $(bindir)/php run-tests.php -q -p $(bindir)/php --set-timeout 300 --show-diff tests - + REPORT_EXIT_STATUS=1 $(bindir)/php run-tests.php -q -p $(bindir)/php --set-timeout 300 --show-diff $(TESTS) +.PHONY: pecl-test +pecl-test: TESTS ?= $(PECL_DIR)/tests +pecl-test: php + REPORT_EXIT_STATUS=1 $(bindir)/php $(prefix)/lib/php/build/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