2018-08-17 13:55:18 +00:00
|
|
|
TOP_SOURCES := $(shell git ls-files | grep -vE 'README|Makefile|^config|^\.git|^\.travis' | grep -v /)
|
2017-12-16 02:56:55 +00:00
|
|
|
CONFIG_SOURCES := $(shell git ls-files config)
|
|
|
|
TARGETS := \
|
|
|
|
$(patsubst %,$(HOME)/.%,$(TOP_SOURCES)) \
|
2019-01-03 15:59:01 +00:00
|
|
|
$(patsubst %,$(HOME)/.%,$(CONFIG_SOURCES)) \
|
|
|
|
$(HOME)/.config/i3/config
|
2012-04-10 04:02:46 +00:00
|
|
|
|
2012-02-26 19:38:01 +00:00
|
|
|
$(HOME)/.%: %
|
2017-12-16 02:56:55 +00:00
|
|
|
$(RM) '$@' && mkdir -p $(dir $@) && ln -svf '$(PWD)/$^' '$@'
|
2012-11-11 13:11:21 +00:00
|
|
|
|
2014-10-01 02:27:46 +00:00
|
|
|
.PHONY: all
|
2017-12-16 02:56:55 +00:00
|
|
|
all: $(HOME)/.config $(TARGETS)
|
|
|
|
|
|
|
|
$(HOME)/.config:
|
|
|
|
mkdir -p $@
|
2012-11-11 13:11:21 +00:00
|
|
|
|
2014-10-01 02:27:46 +00:00
|
|
|
.PHONY: echo
|
2013-01-20 04:05:27 +00:00
|
|
|
echo:
|
2017-12-16 02:56:55 +00:00
|
|
|
@echo TOP_SOURCES=$(TOP_SOURCES)
|
2019-01-03 15:59:01 +00:00
|
|
|
@echo CONFIG_SOURCES=$(CONFIG_SOURCES)
|
2013-01-20 04:05:27 +00:00
|
|
|
@echo TARGETS=$(TARGETS)
|