mirror of https://github.com/Chizi123/Dotfiles.git

Joel Grunbaum
2020-06-01 1c5cae36bd6847dc97ad2e9fed0e0dca4d0331ad
commit | author | age
c40ea6 1 # Targets for install, can be useful to differentiate between user and headless systems
JG 2 TARGETS = home
3
4 ifeq ($(VERBOSE),1)
5     Q =
6 else
7     Q = @
8 endif
9
10 # Commands for operation
11 MKDIR = $(Q)mkdir -p
12 STOW  = $(Q)stow
13 SSTOW = $(Q)sudo stow
14 ECHO  = @echo
15
16 INSTALL_TARGETS   = $(TARGETS)
17 UNINSTALL_TARGETS = $(TARGETS:=-uninstall)
18
19 # List of all applications with stored dotfiles
20 CONFIGS = aspell emacs git libinput-gestures mailcap mpd ncmpcpp rtv shells wallpaper-reddit zsh
21
22 all: help
23
24 .PHONY: $(CONFIGS)
25 $(CONFIGS):
26     $(STOW) -t $(HOME) $@
27
28 .PHONY: $(CONFIGS:=-del)
29 $(CONFIGS:=-del):
30     $(STOW) --delete -t $(HOME) $(@:-del=)
31
32 .PHONY: $(INSTALL_TARGETS)
33 $(INSTALL_TARGETS): $(CONFIGS)
34
35 .PHONY: $(UNINSTALL_TARGETS)
36 $(UNINSTALL_TARGETS): $(CONFIGS:=-del)
37
38 .PHONY: help
39 help:
40     $(ECHO) 'use make "target"'
41     $(ECHO) 'targets:'
42     $(ECHO)    '    home(-uninstall)'