You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
552 B

TOP_SOURCES := $(shell git ls-files | grep -vE 'README|Makefile|^config|^\.git|^\.travis' | grep -v /)
CONFIG_SOURCES := $(shell git ls-files config)
TARGETS := \
$(patsubst %,$(HOME)/.%,$(TOP_SOURCES)) \
$(patsubst %,$(HOME)/.%,$(CONFIG_SOURCES)) \
$(HOME)/.config/i3/config
$(HOME)/.%: %
$(RM) '$@' && mkdir -p $(dir $@) && ln -svf '$(PWD)/$^' '$@'
.PHONY: all
all: $(HOME)/.config $(TARGETS)
$(HOME)/.config:
mkdir -p $@
.PHONY: echo
echo:
@echo TOP_SOURCES=$(TOP_SOURCES)
@echo CONFIG_SOURCES=$(CONFIG_SOURCES)
@echo TARGETS=$(TARGETS)