From: Michael Wallner Date: Mon, 25 Jan 2016 11:08:55 +0000 (+0100) Subject: build ext in checkout dir X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=0a6d8d038ea3143809a14a00bc6a7c7f9f6e236a;p=m6w6%2Ftravis-pecl build ext in checkout dir --- diff --git a/Makefile b/Makefile index cac4848..dbed4c3 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,8 @@ srcdir := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) ifdef TRAVIS_BUILD_DIR curdir ?= $(TRAVIS_BUILD_DIR) else -curdir ?= . +# CURDIR is a make builtin +curdir ?= $(CURDIR) endif enable_maintainer_zts ?= no @@ -31,7 +32,7 @@ PECL_EXTENSION ?= $(shell echo $(PECL) | cut -d: -f1) PECL_SONAME ?= $(if $(shell echo $(PECL) | cut -d: -f2),$(shell echo $(PECL) | cut -d: -f2),$(PECL_EXTENSION)) PECL_VERSION ?= $(shell echo $(PECL) | cut -d: -f3 -s) PECL_INI = $(with_config_file_scan_dir)/pecl.ini -PECL_DIR ?= $(srcdir)/pecl-$(PECL_EXTENSION) +PECL_DIR := $(if $(filter ext ext%, $(MAKECMDGOALS)), $(curdir), $(srcdir)/pecl-$(PECL_EXTENSION)) PHP_VERSION_MAJOR = $(firstword $(subst ., ,$(PHP))) PHP_VERSIONS_JSON = $(srcdir)/php-versions$(PHP_VERSION_MAJOR).json @@ -83,8 +84,6 @@ $(with_config_file_scan_dir): ## -- PECL -ext%: PECL_DIR:=$(curdir) - .PHONY: pecl-check pecl-check: @if test -z "$(PECL)"; then echo "No pecl extension specified, e.g. PECL=pecl_http:http"; exit 1; fi