-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 937 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 937 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
# special makefile variables
.DEFAULT_GOAL := help
.RECIPEPREFIX := >
# recursively expanded variables
SHELL = /usr/bin/sh
# targets
HELP = help
SETUP = setup
# executables
PYTHON = python
PIP = pip
NPM = npm
PRE_COMMIT = pre-commit
# simply expanded variables
executables := \
${PYTHON}\
${NPM}
_check_executables := $(foreach exec,${executables},$(if $(shell command -v ${exec}),pass,$(error "No ${exec} in PATH")))
.PHONY: ${HELP}
${HELP}:
# inspired by the makefiles of the Linux kernel and Mercurial
> @printf '%s\n' 'Common make targets:'
> @printf '%s\n' ' ${SETUP} - install the distro-independent dependencies for this'
> @printf '%s\n' ' project'
.PHONY: ${SETUP}
${SETUP}:
> ${NPM} install
> ${PYTHON} -m ${PIP} install --upgrade "${PIP}"
> ${PYTHON} -m ${PIP} install \
--requirement "./requirements.txt" \
--requirement "./requirements-dev.txt"
> ${PRE_COMMIT} install