2023-01-23 15:48:07 +00:00
|
|
|
SUDO ?= sudo
|
|
|
|
|
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)
|
2020-03-26 13:46:11 +00:00
|
|
|
LOCAL_BIN_SOURCES := $(shell git ls-files local/bin)
|
2023-09-24 13:16:14 +00:00
|
|
|
LOCAL_BG_SOURCES := $(shell git ls-files local/share/backgrounds)
|
2017-12-16 02:56:55 +00:00
|
|
|
TARGETS := \
|
|
|
|
$(patsubst %,$(HOME)/.%,$(TOP_SOURCES)) \
|
2019-01-03 15:59:01 +00:00
|
|
|
$(patsubst %,$(HOME)/.%,$(CONFIG_SOURCES)) \
|
2020-03-26 13:46:11 +00:00
|
|
|
$(patsubst %,$(HOME)/.%,$(LOCAL_BIN_SOURCES)) \
|
2023-09-24 13:16:14 +00:00
|
|
|
$(patsubst %,$(HOME)/.%,$(LOCAL_BG_SOURCES)) \
|
2023-01-23 15:48:07 +00:00
|
|
|
$(HOME)/.config/i3/config \
|
|
|
|
/etc/udev/rules.d/90-trackman-marble.rules \
|
|
|
|
/usr/local/bin/handle-trackman-marble
|
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
|
2023-09-24 13:16:14 +00:00
|
|
|
all: $(HOME)/.config $(HOME)/.local/bin $(HOME)/.local/share/backgrounds $(TARGETS)
|
2017-12-16 02:56:55 +00:00
|
|
|
|
|
|
|
$(HOME)/.config:
|
|
|
|
mkdir -p $@
|
2012-11-11 13:11:21 +00:00
|
|
|
|
2020-03-26 13:46:11 +00:00
|
|
|
$(HOME)/.local/bin:
|
|
|
|
mkdir -p $@
|
|
|
|
|
2023-09-24 13:16:14 +00:00
|
|
|
$(HOME)/.local/share/backgrounds:
|
|
|
|
mkdir -p $@
|
|
|
|
|
2023-01-23 15:48:07 +00:00
|
|
|
/etc/udev/rules.d/90-trackman-marble.rules: udev/rules.d/90-trackman-marble.rules
|
|
|
|
$(SUDO) install -m 0644 -v udev/rules.d/90-trackman-marble.rules $@
|
|
|
|
|
|
|
|
/usr/local/bin/handle-trackman-marble: udev/handle-trackman-marble
|
2023-02-28 21:45:37 +00:00
|
|
|
$(SUDO) install -m 0755 -v udev/handle-trackman-marble $@
|
2023-01-23 15:48:07 +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)
|
2020-03-26 13:46:11 +00:00
|
|
|
@echo LOCAL_BIN_SOURCES=$(LOCAL_BIN_SOURCES)
|
2013-01-20 04:05:27 +00:00
|
|
|
@echo TARGETS=$(TARGETS)
|