-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (26 loc) · 848 Bytes
/
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
CONFIGS_SUB = \
misc \
vim \
shell.zsh \
shell.bash \
vendors
CONFIG_DIR = \
shell.d \
bin
default : all
all : $(CONFIGS_SUB) git-setup
install-dir-% : %
@echo " [ln] Linking $< to ~/.$<"
@ln -sfT $(CURDIR)/$< $(HOME)/.$<
install-subdir-% : %
@echo
@echo " [make] Entering $<"
@make --no-print-directory -C $* install
git-setup:
@echo
@echo " [git] Init vendors submodules"
@sh -c "if git submodule 2>/dev/null >/dev/null; then git submodule init; git submodule update; else echo ' [git] submodule unavailable, disabled some vendors'; fi"
$(HOME)/.history:
@echo " [make] Creating ~/.history"
@mkdir $(HOME)/.history 2>/dev/null
install: git-setup $(foreach f, $(CONFIG_DIR), install-dir-$(f) ) $(foreach f, $(CONFIGS_SUB), install-subdir-$(f) ) $(HOME)/.history