Review new dir tree names
[khome.git] / Makefile
CommitLineData
80cc9199
SK
1MAKEFLAGS := --no-builtin-rules
2
f908f2dc
SK
3DEPS := $(wildcard deps/*)
4
2b497be2 5.PHONY: \
75b7a956 6 default \
2b497be2
SK
7 $(DEPS) \
8 deps \
9 home \
10 mpdconf \
11 pkgs_brew_cask_install \
12 pkgs_brew_install \
13 pkgs_deb_install \
14 pkgs_deb_purge \
15 pkgs_debian \
16 pkgs_mac \
c51a3e0d 17 pkgs_pip \
2b497be2
SK
18 pkgs_snap_classic \
19 pkgs_snap_strict
80cc9199 20
75b7a956
SK
21default:
22 @echo '================================================================================'
23 @echo '| Default target disabled. Specify a concrete one.'
24 @echo '================================================================================'
25 @exit 1
26
de7ac8e9
SK
27home: mpdconf compiled
28 @cp -Rp bin $(HOME)/
9e667c0c
SK
29 @cp -Rp home/bin $(HOME)/
30 @cp -Rp home/lib $(HOME)/
57667523 31 @cp home/.compton.conf $(HOME)/
9e667c0c 32 @cp -Rp home/.config/ $(HOME)/
f1950371 33 @cp -Rp home/.newsboat/ $(HOME)/
9e667c0c
SK
34 @cp home/.profile $(HOME)/
35 @cp home/.fonts.conf $(HOME)/
9e667c0c 36 @cp home/.Rprofile $(HOME)/
9e667c0c
SK
37 @cp home/.tmux.conf $(HOME)/
38 @cp home/.xbindkeysrc $(HOME)/
b2efbb10 39
9d953881
SK
40mpdconf:
41 @mkdir -p ~/Archives/Audio
42 @mkdir -p ~/var/lib/mpd/playlists
43 @mkdir -p ~/var/log/mpd
44 @mkdir -p ~/var/run/mpd
45 @cp home/.mpdconf $(HOME)/
46
de7ac8e9
SK
47compiled:
48 mkdir -p bin
49 cd src && make
50 mv src/clockloop bin/
51
bf20a98b
SK
52font_cache:
53 @fc-cache -fv
54
5bf7b45d
SK
55#
56# Golang
57#
f30c615c
SK
58pkgs_golang: list pkgs-golang.list
59 go get $(shell ./list pkgs-golang.list)
60
5bf7b45d
SK
61#
62# Ubuntu
63#
31b0313b
SK
64pkgs_ubuntu: list pkgs-ubuntu.list
65 sudo apt install $(shell ./list pkgs-ubuntu.list)
66
5bf7b45d
SK
67#
68# PIP
69#
70pkgs_pip:
71 sudo pip3 install $(shell ./list pkgs-pip.list)
72
73#
74# Homebrew/Mac
75#
76
70300ea4
SK
77pkgs_mac:
78 $(MAKE) pkgs_brew_install
79 $(MAKE) pkgs_brew_cask_install
80
cfe722ba
SK
81# TODO: Test pkgs_brew_tap when list contains multiple items
82pkgs_brew_tap: list pkgs-brew-tap.list
83 brew tap $(shell ./list pkgs-brew-tap.list)
84
70300ea4
SK
85pkgs_brew_install: list pkgs-brew-install.list
86 brew install $(shell ./list pkgs-brew-install.list)
87
88pkgs_brew_cask_install: list pkgs-brew-cask-install.list
89 brew cask install $(shell ./list pkgs-brew-cask-install.list)
90
5bf7b45d
SK
91#
92# Debian
93#
649af0dd
SK
94pkgs_deb_install: list pkgs-deb-install.list
95 sudo apt install $(shell ./list pkgs-deb-install.list)
600d3b0b 96
649af0dd
SK
97pkgs_deb_purge: list pkgs-deb-purge.list
98 sudo apt purge $(shell ./list pkgs-deb-purge.list)
b59a4c3b 99
5bf7b45d
SK
100#
101# Snap
102#
649af0dd
SK
103pkgs_snap_classic: list pkgs-snap-classic.list
104 @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-classic.list),pkg_snap_classic_$(p))
6ce65841 105
7ae05795
SK
106pkgs_snap_strict: list pkgs-snap-strict.list
107 @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-strict.list),pkg_snap_strict_$(p))
108
109# 'snap' command comes from 'snapd' deb pkg
6ce65841
SK
110pkg_snap_classic_%:
111 sudo snap install --classic $*
7ae05795
SK
112pkg_snap_strict_%:
113 sudo snap install $*
6ce65841 114
f908f2dc
SK
115deps: $(DEPS)
116
117define GEN_DEP_RULE
118$(1):
119 cd $1 && make
120endef
121
122$(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d))))
ab64e543
SK
123
124diff:
8db388f4
SK
125 diff $(HOME)/.Rprofile home/.Rprofile || true
126 diff $(HOME)/.compton.conf home/.compton.conf || true
127 diff $(HOME)/.config/dunst/dunstrc home/.config/dunst/dunstrc || true
128 diff $(HOME)/.config/mimeapps.list home/.config/mimeapps.list || true
129 diff $(HOME)/.config/neofetch/config.conf home/.config/neofetch/config.conf || true
130 diff $(HOME)/.config/ranger/rc.conf home/.config/ranger/rc.conf || true
131 diff $(HOME)/.config/screengrab/screengrab.conf home/.config/screengrab/screengrab.conf || true
132 diff $(HOME)/.fonts.conf home/.fonts.conf || true
133 diff $(HOME)/.mpdconf home/.mpdconf || true
134 diff $(HOME)/.newsboat/config home/.newsboat/config || true
135 diff $(HOME)/.profile home/.profile || true
136 diff $(HOME)/.tmux.conf home/.tmux.conf || true
137 diff $(HOME)/.xbindkeysrc home/.xbindkeysrc || true
138 diff $(HOME)/lib/login_aliases.sh home/lib/login_aliases.sh || true
139 diff $(HOME)/lib/login_functions.sh home/lib/login_functions.sh || true
140 diff $(HOME)/lib/login_variables.sh home/lib/login_variables.sh || true
141 diff $(HOME)/lib/login_variables_dpi_high.sh home/lib/login_variables_dpi_high.sh || true
142 diff $(HOME)/lib/login_variables_dpi_norm.sh home/lib/login_variables_dpi_norm.sh || true
This page took 0.050231 seconds and 4 git commands to generate.