|
@@ -59,6 +59,8 @@ $(warning home: $(home)) |
|
|
localdir := $(home)/.local |
|
|
localdir := $(home)/.local |
|
|
vardir := $(home)/.var |
|
|
vardir := $(home)/.var |
|
|
bindir := $(localdir)/bin |
|
|
bindir := $(localdir)/bin |
|
|
|
|
|
directories := $(dotfiles_dir) $(home) $(localdir) $(vardir) $(bindir) \ |
|
|
|
|
|
$(home)/.emacs.d |
|
|
|
|
|
|
|
|
current := $(shell date) |
|
|
current := $(shell date) |
|
|
uname := $(shell uname) |
|
|
uname := $(shell uname) |
|
@@ -105,6 +107,10 @@ check-syntax: test-syntax |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(directories): |
|
|
|
|
|
test -d "$@" || mkdir -vp "$@" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# System detection |
|
|
# System detection |
|
|
# ================ |
|
|
# ================ |
|
@@ -154,8 +160,7 @@ files_fullpath := $(files:%=$(dotfiles_dir)/%) |
|
|
fetch_files := $(files:%=fetch-%) |
|
|
fetch_files := $(files:%=fetch-%) |
|
|
.PHONY: $(fetch_files) |
|
|
.PHONY: $(fetch_files) |
|
|
|
|
|
|
|
|
$(fetch_files): |
|
|
|
|
|
mkdir -vp $(dotfiles_dir) |
|
|
|
|
|
|
|
|
$(fetch_files): fetch-%: $(dotfiles_dir) |
|
|
curl --url $(dotfiles_url_base)/$* --output $@ |
|
|
curl --url $(dotfiles_url_base)/$* --output $@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -212,17 +217,6 @@ ack-2.12: util_url := http://beyondgrep.com/ack-2.12-single-file |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# create directories |
|
|
|
|
|
# ------------------ |
|
|
|
|
|
|
|
|
|
|
|
setup_directories := $(localdir) $(vardir) $(bindir) |
|
|
|
|
|
setup-directory: $(setup_directories) |
|
|
|
|
|
|
|
|
|
|
|
$(localdir) $(vardir) $(bindir): |
|
|
|
|
|
mkdir -vp $@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# darwin setup |
|
|
# darwin setup |
|
|
# ------------ |
|
|
# ------------ |
|
|
|
|
|
|
|
@@ -342,13 +336,15 @@ setup-rc: $(setup_rcs) |
|
|
command_extract_setup_load := $(grep) -e 'SETUP_LOAD: ' | \ |
|
|
command_extract_setup_load := $(grep) -e 'SETUP_LOAD: ' | \ |
|
|
sed -e 's/^.*SETUP_LOAD: //' -e 's|DOTFILES_DIR|$(dotfiles_dir)|' |
|
|
sed -e 's/^.*SETUP_LOAD: //' -e 's|DOTFILES_DIR|$(dotfiles_dir)|' |
|
|
|
|
|
|
|
|
$(setup_rcs): setup-rc-%: $(dotfiles_dir)/% |
|
|
|
|
|
|
|
|
$(setup_rcs): setup-rc-%: $(dotfiles_dir)/% $(home) |
|
|
cat "$<" | $(command_extract_setup_load) | tee -a "$(topfile)" |
|
|
cat "$<" | $(command_extract_setup_load) | tee -a "$(topfile)" |
|
|
|
|
|
|
|
|
setup-rc-vimrc: topfile := $(home)/.vimrc |
|
|
setup-rc-vimrc: topfile := $(home)/.vimrc |
|
|
setup-rc-tmux.conf: topfile := $(home)/.tmux.conf |
|
|
setup-rc-tmux.conf: topfile := $(home)/.tmux.conf |
|
|
setup-rc-emacs.el: topfile := $(home)/.emacs.d/init.el |
|
|
setup-rc-emacs.el: topfile := $(home)/.emacs.d/init.el |
|
|
|
|
|
|
|
|
|
|
|
setup-rc-emacs.el: $(home)/.emacs.d |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# run |
|
|
# run |
|
|
# === |
|
|
# === |
|
|