-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
101 lines (83 loc) · 1.89 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
dotfiles := $(shell pwd)
workspace := $(HOME)
.PHONY: all
shells: bash zsh tmux profile
# SYMLINK CREATION
bin/%:
mkdir -p $(workspace)/.local/$(@D)
ln -fs $(dotfiles)/$@ $(workspace)/.local/$@
emacs/%:
mkdir -p $(workspace)/.emacs.d
ln -fs $(dotfiles)/$@ $(workspace)/.emacs.d/$(@F)
gtk/%:
mkdir -p $(workspace)/.config/gtk-3.0
mkdir -p $(workspace)/.config/gtk-4.0
ln -fs $(dotfiles)/$@ $(workspace)/.config/gtk-3.0/$(@F)
ln -fs $(dotfiles)/$@ $(workspace)/.config/gtk-4.0/$(@F)
ipython/%:
mkdir -p $(workspace)/.ipython/profile_default
ln -fs $(dotfiles)/$@ $(workspace)/.ipython/profile_default/$(@F)
julia/%:
mkdir -p $(workspace)/.julia/config
ln -fs $(dotfiles)/$@ $(workspace)/.julia/config/$(@F)
jupyter/%:
mkdir -p $(workspace)/.jupyter
ln -fs $(dotfiles)/$@ $(workspace)/.jupyter/$(@F)
nix/%:
mkdir -p $(workspace)/.config/$(@D:nix/%=%)
ln -fs $(dotfiles)/$@ $(workspace)/.config/$(@:nix/%=%)
# symlinks to ~/
ctags/% \
editorconfig/% \
git/% \
r/% \
shells/% \
vim/% \
wezterm/% \
:
ln -fs $(dotfiles)/$@ $(workspace)/.$(@F)
# symlinks to ~/.config/
alacritty/% \
kitty/% \
latexmk/% \
nnn/% \
nvim/% \
rofi/% \
zathura/% \
direnv/% \
sc-im/% \
:
mkdir -p $(workspace)/.config/$(@D)
ln -fs $(dotfiles)/$@ $(workspace)/.config/$@
# CONFIGS
inputrc: shells/inputrc
profile: shells/profile
bash: inputrc $(wildcard shells/bash*)
zsh: inputrc $(wildcard shells/zsh*)
tmux: inputrc $(wildcard shells/tmux*)
jupyter: $(wildcard jupyter/*)
mkdir -p $(workspace)/.local/share/jupyter/kernels
# find files in the listed directories
.SECONDEXPANSION:
alacritty \
bin \
ctags \
editorconfig \
emacs \
git \
gtk \
ipython \
julia \
kitty \
nix \
nnn \
nvim \
r \
rofi \
latexmk \
vim \
zathura \
direnv \
sc-im \
wezterm \
: %: $$(shell find % -type f)