-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (38 loc) · 1.43 KB
/
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
40
41
42
43
44
45
46
47
48
49
# Written for BASH
SHELL := bash
# Set default shell flags
.SHELLFLAGS := -eu -o pipefail -c
# Run one target in one shell session for GNU make
# .ONESHELL
# Delete target file if make rule fails for GNU make
# .DELETE_ON_ERROR
# Use > instead of tab for block char for GNU make
# .RECIPEPREFIX = >
# Warm me about undefined vars early
MAKEFLAGS += --warn-undefined-variables
# Turn off built-in implicit rules (I like them to be explicit)
MAKEFLAGS += --no-builtin-rules
# Running `make` will trigger `make help`
.DEFAULT_GOAL := help
OS=`[ -f /etc/os-release ] && grep ^ID= /etc/os-release | cut -d = -f 2 || uname`
# printf formatting
BOLD="\033[1m"
NORMAL="\033[0m"
help: ## Prints target: [dep1 dep1 ...] and what it does
@echo -e ${BOLD}
@grep -E '^[a-zA-Z_-]+.*## .*$$' $(MAKEFILE_LIST) | sed 's/^Makefile://' | column -t -s"##"
deps: ## Check deps
@mkdir -p /tmp
@which clojure || echo clojure , > /tmp/deps-missing
@which geckodriver || echo geckodriver , >> /tmp/deps-missing
@echo '*********************************************'
@if [[ -f /tmp/deps-missing ]]; then \
echo Please install `cat /tmp/deps-missing`; \
rm /tmp/deps-missing; \
exit 1; \
else \
echo You have all required deps installed.; \
fi
@echo '*********************************************'
gcount: deps ## Visualizes google search results of "Clojure Programming" "Elixir Programming" "Elm Programming"
clj -X:gcount