Makefile
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 13 Mar 2010 15:47:40 +0200
changeset 18 2e991b769c95
parent 15 a261abd34f1b
child 20 9cf206648ce7
permissions -rw-r--r--
Move all config file to same dir.

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)/$$item ] || mkdir -p $(HOME)/$$item; \
			[ -f $$file ] && install -m 640 $$item $(HOME)/$$item; \
		done; \
	done

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

.PHONY: clean
clean:

.PHONY: distclean
distclean: clean