-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (47 loc) · 2.16 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
DOWNLOAD = curl -O
DESTDIR = $(HOME)
MKDIR = mkdir -p
INSTALL = cp
EMACS_FILES = $(wildcard .emacs.d/elisp/*.el) .emacs.d/init.el
BIN_FILES = $(wildcard bin/*)
BASH_FILES = .bashrc .bash_profile .bash_logout
GIT_FILES = .gitconfig .config/git/ignore
SHELL_FILES = $(BIN_FILES) $(BASH_FILES) .screenrc $(GIT_FILES)
STUMPWM_FILES = .stumpwmrc $(DESTDIR)/.sbclrc $(wildcard .config/stumpwm/*.lisp) $(DESTDIR)/.config/stumpwm/contrib
FILES = .bashrc .bash_logout .bash_profile .gitconfig .muttrc .sbclrc .screenrc \
.xinitrc .gnupg/gpg-agent.conf .gnupg/gpg.conf .config/compton/compton.conf \
.config/mpd/mpd.conf .config/dunst/dunstrc .config/git/ignore .config/mutt/colors.linux \
.config/stumpwm/contrib .procmailrc .guile $(STUMPWM_FILES) $(wildcard bin/*) \
.config/xorg/Xmodmap .config/xorg/Xresources .config/gtkrc-2.0 $(EMACS_FILES) \
.config/mpdcron/mpdcron.conf $(wildcard .config/mpdcron/hooks/*) .config/mpdnotify.conf \
.config/ncmpcpp/config .config/htop/htoprc
all: $(addprefix $(DESTDIR)/, $(FILES))
source $(DESTDIR)/.bash_profile #updates environment vairables without relogging in
mkdir -p $(XDG_CONFIG_HOME)
mkdir -p $(XDG_CACHE_HOME)
mkdir -p $(XDG_DATA_HOME)/xorg
quicklisp.lisp:
$(DOWNLOAD) https://beta.quicklisp.org/quicklisp.lisp
$(DESTDIR)/.sbclrc: quicklisp.lisp install.lisp
sbcl --load install.lisp
cp .sbclrc $(DESTDIR)
$(DESTDIR)/.config/stumpwm/contrib:
git clone https://github.com/stumpwm/stumpwm-contrib.git $(DESTDIR)/.config/stumpwm/contrib
$(DESTDIR)/%: %
test -z $(@D) || mkdir -p $(@D)
$(INSTALL) $< $(@D)
shell: $(addprefix $(DESTDIR)/, $(SHELL_FILES))
bash: $(addprefix $(DESTDIR)/, $(BASH_FILES))
git: $(addprefix $(DESTDIR)/, $(GIT_FILES))
bin: $(addprefix $(DESTDIR)/, $(BIN_FILES))
emacs:
mkdir -p $(DESTDIR)/.emacs.d/elisp
$(shell test -f $(DESTDIR)/.emacs && mv $(DESTDIR)/.emacs $(DESTDIR)/.emacs.copy)
$(shell test -f $(DESTDIR)/.emacs.d/init.el && mv $(DESTDIR)/.emacs.d/init.el $(DESTDIR)/.emacs.d/init.el.copy)
$(MAKE) emacs-full
emacs-full: $(addprefix $(DESTDIR)/, $(EMACS_FILES))
$(INSTALL) $< $(@D)
stumpwm: $(addprefix $(DESTDIR)/, $(STUMPWM_FILES))
mkdir -p $(@D)
$(INSTALL) $< $(@D)
.PHONY: all emacs stumpwm emacs-full