3 CONFDIR = $(HOME)/.disorder
4 SERVERS := $(patsubst $(CONFDIR)/passwd.%,%,\
5 $(wildcard $(CONFDIR)/passwd.*[!~]))
6 config = $(CONFDIR)/passwd.$1
11 v_tag = $(call v_tag_$V,$1)
12 v_tag_0 = @printf " %-8s %s\n" '$1' '$@';
15 @echo "usage: make fetch | diff | push"
20 BLACKLISTS = $(addprefix blacklist.,$(SERVERS))
21 $(BLACKLISTS): blacklist.%: force
23 disorder-autoplay get $(call config,$*) >$@.new && \
27 clean::; rm -f blacklist.*
29 DIFFS = $(addsuffix .diff,$(BLACKLISTS))
30 $(DIFFS): blacklist.%.diff: blacklist.% force
31 $(call v_tag,DIFF)diff -u $< blacklist >$@.new; \
32 case $$? in 0 | 1) ;; *) exit $? ;; esac; \
35 $(V_AT)rc=0; for i in $(DIFFS); do \
36 if [ -s $$i ]; then rc=1; colordiff <$$i; fi; \
41 PUSHES = $(addprefix push/, $(SERVERS))
44 disorder-autoplay set $(call config,$*) blacklist
46 .PHONY: push $(PUSHES)