-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 1.26 KB
/
Copy pathMakefile
File metadata and controls
45 lines (33 loc) · 1.26 KB
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
#!/usr/bin/make -f
SHELL := /bin/bash
# Test that we have the necessary binaries available
define checkExecutables
$(foreach exec,$(1),\
$(if $(shell command -v $(exec)),,$(error Unable to find `$(exec)` in your PATH)))
endef
# Note that all comments with two hashes(#) will be used for output with `make help`. Alignment is tricky!
.PHONY: help
help:
$(call checkExecutables, fgrep)
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
##
## Coding Standard (PHP) — PHP coding standards and linting config make targets. Run `make help` to list targets.
##
##
## --- Setup ---------------------------------------------------------------
##
.PHONY: init
init: ## Initializes the project and all dependencies
$(call checkExecutables, php composer)
@$(MAKE) install-vendors
##
## --- Dependencies --------------------------------------------------------
##
.PHONY: install-vendors
install-vendors: ## Installs all the vendor lib dependencies.
$(call checkExecutables, composer)
@composer install -n --ignore-platform-reqs
.PHONY: update-vendors
update-vendors: ## Updates all the vendor lib dependencies.
$(call checkExecutables, composer)
@composer update --prefer-dist --ignore-platform-reqs