Makefile
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 13 Mar 2010 15:52:00 +0200
changeset 20 9cf206648ce7
parent 18 2e991b769c95
child 21 a2b9b6ed57af
permissions -rw-r--r--
Fix copy/paste issue.

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

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

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

.PHONY: clean
clean:

.PHONY: distclean
distclean: clean