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.

20 lines
477 B

TOP_SOURCES := $(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)/.%: %
$(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 TARGETS=$(TARGETS)