-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
39 lines (28 loc) · 886 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
HOST_SOURCE_PATH=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
USER_ID=$(shell id -u)
GROUP_ID=$(shell id -g)
export USER_ID
export GROUP_ID
ifneq (,$(filter $(firstword $(MAKECMDGOALS)),composer phpunit))
CLI_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(CLI_ARGS):;@:)
endif
COMPOSER_ARGS=
ifeq (composer, $(firstword $(MAKECMDGOALS)))
ifneq (,$(filter install update,$(CLI_ARGS)))
COMPOSER_ARGS=--ignore-platform-reqs
endif
endif
composer: composer.phar
php composer.phar $(CLI_ARGS) $(COMPOSER_ARGS)
composer-install: composer.phar
php composer.phar install --ignore-platform-reqs
composer.phar:
curl -sS https://getcomposer.org/installer | php
clean: remove-deps
rm -f composer.lock
rm -f composer.phar
remove-deps:
rm -rf vendor
-include phpunit.mk
.PHONY: composer composer-install clean remove-deps