-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 901 Bytes
/
Makefile
File metadata and controls
31 lines (24 loc) · 901 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
SHELL = /bin/bash
PRE-COMMIT := $(shell which pre-commit)
all: pre-commit .prereqs.stamp install
# Shortcut to run pre-commit hooks over the entire repo.
pre-commit: .git/hooks/pre-commit
pre-commit run --all-files
# Update the pre-commit hooks if the pre-commit binary is updated.
.git/hooks/pre-commit: $(PRE-COMMIT)
pre-commit install
# Re-check prereqs if the prereqs configuration is newer than the last time
# we checked.
.prereqs.stamp: README.md
.bin/prereqs -r README.md
touch .prereqs.stamp
# We need to handle LaunchAgents & Applications as special cases; macOS doesn't create automatically,
# and we can't assume other software won't put things there. Therefor, ensure they exist before
# stow runs
install: .prereqs.stamp
mkdir -m 0755 -p $(HOME)/Library/LaunchAgents
mkdir -m 0755 -p $(HOME)/Applications
stow */
clean:
rm -f .*.stamp
.PHONY: all clean pre-commit install