-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
54 lines (48 loc) · 1.17 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
-include config.mak
.DEFAULT_GOAL = all
DESTDIR ?= $(HOME)
ifndef MACOS
ifeq ($(shell uname -s), Darwin)
MACOS=YesPlease
endif
endif
include bash/rules.mak
include zsh/rules.mak
ifdef MACOS
ifdef BREW
include brew/rules.mak
endif # BREW
include alacritty/rules.mak
endif # MACOS
include bin/rules.mak
include git/rules.mak
include vim/rules.mak
include editorconfig/rules.mak
ifndef NO_MUTT
include msmtp/rules.mak
include mutt/rules.mak
endif # NO_MUTT
ifdef MACOS
include defaults/rules.mak
include skhd/rules.mak
include yabai/rules.mak
endif # MACOS
include gpg/rules.mak
include ssh/rules.mak
.PHONY : all
all : $(PRE_INSTALL) install $(POST_INSTALL)
# from brian m. carlson.
.PHONY : install
install:
@printf "%s %s\n" $(INSTALL_PAIRS) | (set -e; while read src dest; do \
if [ -d "$$src" ]; then \
printf "%8s %s\n" "DIR" "$(DESTDIR)/$$dest"; \
mkdir -p "$(DESTDIR)/$$dest"; \
printf "%8s %s -> %s\n" "SYNC" "$$src" "$(DESTDIR)/$$dest"; \
rsync -a --exclude '*.mak' "$$src/" "$(DESTDIR)/$$dest/"; \
else \
printf "%8s %s -> %s\n" "CP" "$$src" "$(DESTDIR)/$$dest"; \
mkdir -p $$(dirname "$(DESTDIR)/$$dest"); \
cp -pr "$$src" "$(DESTDIR)/$$dest"; \
fi; \
done)