-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
66 lines (53 loc) · 1.46 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# refs
# - https://opensource.com/article/18/8/what-how-makefile
# - https://maex.me/2018/02/dont-fear-the-makefile/
# - http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/
# targets without immediate file dependencies
.PHONY: all check fix format gui help lint nix setup headless-setup symlink
.DEFAULT_GOAL := help
lint:
./infra/actions/shellcheck
format:
./infra/actions/shfmt -w -s # write to file, simplify code
check: lint
./infra/actions/shfmt -d # error on diff
fix: format
./infra/actions/shellcheck --fix
headless-setup:
./infra/setup/setup_dotfiles --headless
setup:
./infra/setup/setup_dotfiles
nix:
./infra/setup/bin/setup_nix
symlink:
./infra/setup/bin/symlink
gui:
./gui/setup/setup_gui
# config specific to my use cases
nathan:
./infra/setup/bin/symlink --nathan
./infra/setup/bin/setup_macos_settings
all:
./infra/setup/setup_dotfiles
./gui/setup/setup_gui
help:
@echo 'make help'
@echo ' show this help message'
@echo 'make setup'
@echo ' set up dotfiles'
@echo 'make nix'
@echo ' set up nix'
@echo 'make symlink'
@echo ' symlink config files (like .zshrc) to their appropriate locations'
@echo 'make gui'
@echo ' set up gui parts of config'
@echo 'make all'
@echo ' set up terminal & gui parts of config'
@echo 'make lint'
@echo ' lint (shellcheck)'
@echo 'make format'
@echo ' format (shfmt)'
@echo 'make check'
@echo ' run lint & formatting checks'
@echo 'make fix'
@echo ' format & apply any lint fixes'