From: Michael Wallner Date: Mon, 25 Jan 2016 11:18:07 +0000 (+0100) Subject: less $(shell), better Makefile X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=769fe6be0d15669eec7308b6f8d1e17124187814;p=m6w6%2Ftravis-pecl less $(shell), better Makefile --- diff --git a/Makefile b/Makefile index dbed4c3..edaf87b 100644 --- a/Makefile +++ b/Makefile @@ -28,9 +28,10 @@ with_php_config ?= $(bindir)/php-config extdir = $(shell test -x $(with_php_config) && $(with_php_config) --extension-dir) PECL_MIRROR ?= http://pecl.php.net/get/ -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_WORDS := $(subst :, ,$(PECL)) +PECL_EXTENSION ?= $(word 1,$(PECL_WORDS)) +PECL_SONAME ?= $(if $(word 2,$(PECL_WORDS)),$(word 2,$(PECL_WORDS)),$(PECL_EXTENSION)) +PECL_VERSION ?= $(word 3,$(PECL_WORDS)) PECL_INI = $(with_config_file_scan_dir)/pecl.ini PECL_DIR := $(if $(filter ext ext%, $(MAKECMDGOALS)), $(curdir), $(srcdir)/pecl-$(PECL_EXTENSION))