summaryrefslogtreecommitdiff
path: root/Makefile
blob: 9609f9bbf7516595b3a5478c40d2cf0cd1e8d3e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
ifndef HOME
$(error "$$HOME" must be defined)
endif

DOTFILES := $(shell find dot \( -type f -o -type l \) -not -name '.*')

DESTINATIONS = $(DOTFILES:dot/%=${HOME}/.%)

EXECUTABLES = $(filter dot/local/bin/%, $(DOTFILES))

$(HOME)/.%: dot/%
	install -D -m $(if $(filter $<, $(EXECUTABLES)), 0755, 0644) $< $@

install: $(DESTINATIONS)