1. Yuya Nishihara
  2. dotfiles

Source

dotfiles / Makefile

DESTDIR = $(HOME)
GIT = git
HG = hg
PYTHON = python

help:
	@echo 'Make targets:'
	@cat $(MAKEFILE_LIST) | grep ^## | sed s/^##//
	@echo
	@echo 'Make variables:'
	@echo ' DESTDIR = $(DESTDIR)'

## install      - install symlinks to all dot files
install: fixperm
	$(PYTHON) ./install.py -a -t $(DESTDIR)
	./install-colorgcc.sh "$(DESTDIR)/bin"
	$(MAKE) -C $(DESTDIR)/.emacs.d/lisp

## fixperm      - fix permission of dot files
fixperm:
	./fixperm.sh

## compile-el   - compile emacs lisp
compile-el:
	$(MAKE) -C ~/.emacs.d/lisp
.PHONY: compile-el

update-monky:
	cd vendor/monky && $(GIT) pull
	cp vendor/monky/monky.el dot.emacs.d/lisp
	$(HG) addremove dot.emacs.d/lisp/
	$(HG) ci -m "monky: update to $$(cd vendor/monky \
		&& $(GIT) log -1 --pretty=format:%h)" dot.emacs.d/lisp

define hg-update-vendor-code
	$(RM) -R $(destdir)
	$(HG) -R $< pull -u
	cp -R $</$(notdir $<) $(destdir)
	$(HG) addremove $(destdir)
	$(HG) ci -m "$(notdir $<): update to $$($(HG) -R $< id -i)" $(destdir)
endef

update-rope: destdir = dot.emacs.d/pymacs/rope
update-rope: vendor/rope
	$(hg-update-vendor-code)
.PHONY: update-rope

update-ropemacs: destdir = dot.emacs.d/pymacs/ropemacs
update-ropemacs: vendor/ropemacs
	$(hg-update-vendor-code)
.PHONY: update-ropemacs

update-ropemode: destdir = dot.emacs.d/pymacs/ropemode
update-ropemode: vendor/ropemode
	$(hg-update-vendor-code)
.PHONY: update-ropemode

.PHONY: help instal fixperm