Makefile
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 28 Jan 2010 20:15:56 +0200
changeset 269 81c80df45b37
parent 268 b2cd8fbe5ec3
child 270 61173396cfe4
permissions -rw-r--r--
Udded uninstall target.

# Copyright (C) 2008 by Oleksandr Gavenko <gavenkoa@gmail.com>

ifeq '' '$(HOME)'
  $(error Home env var not set!)
endif

.PHONY: all
all: install

.PHONY: install-all
install-all: install
	cp .emacs-pre $(HOME)/.emacs-pre
	cp .emacs-post $(HOME)/.emacs-post

.PHONY: install
install: .emacs .emacs-my .emacs-pre .emacs-post $(wildcard template-pre/*.el)
	for file in .emacs-pre .emacs-post; do \
		if [ ! -f $(HOME)/$$file ]; then cp $$file $(HOME)/$$file; fi; \
	done
	cp .emacs $(HOME)/.emacs
	cp .emacs-my $(HOME)/.emacs-my
	rm -r $(HOME)/.emacs.d/my
	mkdir -p $(HOME)/.emacs.d/my
	for file in $(wildcard template-pre/*.el); do \
		cp -f $$file $(HOME)/.emacs.d/my; \
	done

.PHONY: uninstall
uninstall:
	@echo !!! Nothing done !!!

.PHONY: tar
tar:
	tar cf dot-emacs.tar .emacs .emacs-my

.PHONY: distclean
distclean: clean

.PHONY: clean
clean:
	rm -f dot-emacs.tar