From 0a6d8d038ea3143809a14a00bc6a7c7f9f6e236a Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 25 Jan 2016 12:08:55 +0100 Subject: [PATCH] build ext in checkout dir --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.30.2