Makefile
author user@localhost
Sat, 24 Apr 2010 21:44:38 +0300
changeset 59 9c0a6fa1b7bd
parent 47 918a1b3e1a7e
child 72 a1c1239991de
permissions -rw-r--r--
Added hg config.

SHELL = /bin/sh

.PHONY: all
all:

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

host_os = linux
ifneq '' '$(COMSPEC)'
  host_os = windows
endif

ITEMS = .Xdefaults .bashrc .mailsign .xinitrc .mc .vimrc .inputrc .ssh .hgrc .hgignore

.PHONY: install
install:
	for item in $(ITEMS); do \
		if [ -f $$item ]; then \
			install -m 640 $$item $(HOME)/$$item; \
		fi; \
		if [ -d $$item ]; then \
			for file in `find $$item`; do \
				if [ -d $$file ]; then \
					[ -d $(HOME)/$$file ] || mkdir -p $(HOME)/$$file; \
				fi; \
				if [ -f $$file ]; then \
					install -m 640 $$file $(HOME)/$$file; \
				fi; \
			done; \
		fi; \
	done

.PHONY: uninstall
uninstall:
	rm -f $(HOME)/.mailsign

.PHONY: clean
clean:

.PHONY: distclean
distclean: clean