-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 730 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 730 Bytes
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
# XDG Base Directory Specification
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
XDG_CONFIG_HOME?=${HOME}/.config
XDG_DATA_HOME?=${HOME}/.local/share
XDG_CACHE_HOME?=${HOME}/.cache
TOP:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
CONF_HOME:=${XDG_CONFIG_HOME}
H=@
-include $(TOP)/package.mk
-include $(TOP)/dotfile.mk
%.remove:
$(H)$(eval NAME:=$(strip $(subst .remove,,$@)))
$(H)if [[ -d "$(CONF_HOME)/$(NAME)" ]]; then
rm -rv $(CONF_HOME)/$(NAME)
elif [[ -e "$(CONF_HOME)/dotfile/$(NAME)" ]]; then
rm -rv $(CONF_HOME)/dotfile/$(NAME)
rm -rv ~/.$(NAME)
fi
$(H)echo "Remove Configuration: $(NAME)"
%.install:
%.uninstall:
.PHONY: all %.remove %.install %.uninstall