-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (39 loc) · 932 Bytes
/
Makefile
File metadata and controls
55 lines (39 loc) · 932 Bytes
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
COMPOSER_CMD=composer
PHIVE_CMD=phive
BOX_CMD=tools/box
PHPUNIT_CMD=tools/phpunit
PHPCS_CMD=tools/phpcs
.DEFAULT_GOAL=all
TARGET=inroute.phar
SRC_FILES:=$(shell find src/ -type f -name '*.php')
$(TARGET): vendor/installed $(SRC_FILES) box.json $(BOX_CMD)
$(BOX_CMD) compile
.PHONY: all
all: test build
.PHONY: build
build: $(TARGET)
.PHONY: clean
clean:
rm -f $(TARGET)
rm -rf vendor
rm -f phive.xml
rm -rf tools
.PHONY: test
test: phpunit phpcs
.PHONY: phpunit
phpunit: vendor/installed $(PHPUNIT_CMD)
$(PHPUNIT_CMD)
.PHONY: phpcs
phpcs: $(PHPCS_CMD)
$(PHPCS_CMD)
composer.lock: composer.json
@echo composer.lock is not up to date
vendor/installed: composer.lock
$(COMPOSER_CMD) install --prefer-dist
touch $@
$(BOX_CMD):
$(PHIVE_CMD) install humbug/box:3 --force-accept-unsigned
$(PHPUNIT_CMD):
$(PHIVE_CMD) install phpunit:8 --trust-gpg-keys 4AA394086372C20A
$(PHPCS_CMD):
$(PHIVE_CMD) install phpcs