summaryrefslogtreecommitdiffstats
path: root/dotfiles2.mk
blob: 521b06dc887f73b87704fcd0e8eb102742a0cfdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DESTDIR?=$(HOME)
DESTDIR:=$(DESTDIR)/$(SUBDIR)

RSYNC=rsync
RFLAGS=--links --perms --times --group --owner --dirs --verbose \
	--update --delete --exclude=Makefile --exclude=.gitignore \
	$(addprefix --exclude=,$(EXCLUDE))

install-modules=$(addprefix install-,$(MODULES))

install: $(install-modules)
	@echo "Syncing $(CURDIR)/ with $(DESTDIR)"
	@$(RSYNC) $(RFLAGS) $(CURDIR)/ $(DESTDIR)
	@echo

$(install-modules): install-%:
	@DESTDIR=$(DESTDIR) $(MAKE) -s -C $* install