From a3ee1cf373ac71bd5523acfa91f68ad6fe5b30b5 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 26 May 2013 17:55:03 +0200 Subject: [PATCH] Add dotfiles2.mk This should replace dotfiles.mk soon --- dotfiles2.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 dotfiles2.mk diff --git a/dotfiles2.mk b/dotfiles2.mk new file mode 100644 index 0000000..521b06d --- /dev/null +++ b/dotfiles2.mk @@ -0,0 +1,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