equal
deleted
inserted
replaced
10 host_os = linux |
10 host_os = linux |
11 ifneq '' '$(COMSPEC)' |
11 ifneq '' '$(COMSPEC)' |
12 host_os = windows |
12 host_os = windows |
13 endif |
13 endif |
14 |
14 |
15 OVERRIDDEN_ITEMS = .Xdefaults .bashrc .mailsign .xinitrc .mc .vimrc .inputrc .ssh .hgrc .hgignore .bazaar .minttyrc |
15 OVERRIDDEN_ITEMS = .Xdefaults .bashrc .mailsign .xinitrc .vimrc .inputrc .ssh .hgrc .hgignore .bazaar .minttyrc |
|
16 MANUALINSTALL_ITEMS = .mc |
16 IFNONEXIST_ITEMS = .wgetrc |
17 IFNONEXIST_ITEMS = .wgetrc |
17 |
18 |
18 .PHONY: install |
19 .PHONY: install |
19 install: |
20 install: |
20 for item in $(OVERRIDDEN_ITEMS); do \ |
21 for item in $(OVERRIDDEN_ITEMS); do \ |
45 install -m 640 $$file $(HOME)/$$file; \ |
46 install -m 640 $$file $(HOME)/$$file; \ |
46 fi; \ |
47 fi; \ |
47 done; \ |
48 done; \ |
48 fi; \ |
49 fi; \ |
49 done |
50 done |
|
51 mkdir -p $(HOME)/.mc |
|
52 install -m 640 .mc/bashrc $(HOME)/.mc |
|
53 install -m 640 .mc/ini $(HOME)/.mc |
|
54 ifeq '$(host_os)' 'windows' |
|
55 install -m 640 .mc/bindings.cygwin $(HOME)/.mc/bindings |
|
56 else |
|
57 install -m 640 .mc/bindings $(HOME)/.mc/bindings |
|
58 endif |
50 |
59 |
51 .PHONY: uninstall |
60 .PHONY: uninstall |
52 uninstall: |
61 uninstall: |
53 for item in $(OVERRIDDEN_ITEMS); do \ |
62 for item in $(OVERRIDDEN_ITEMS); do \ |
54 if [ -f $$item ]; then \ |
63 if [ -f $$item ]; then \ |
62 fi; \ |
71 fi; \ |
63 [ -f $(HOME)/$$file ] && rm $(HOME)/$$file; \ |
72 [ -f $(HOME)/$$file ] && rm $(HOME)/$$file; \ |
64 done; \ |
73 done; \ |
65 fi; \ |
74 fi; \ |
66 done |
75 done |
|
76 rm -f $(HOME)/.mc/bashrc $(HOME)/.mc/ini $(HOME)/.mc/bindings |
|
77 rmdir $(HOME)/.mc || : |
67 |
78 |
68 .PHONY: clean |
79 .PHONY: clean |
69 clean: |
80 clean: |
70 |
81 |
71 .PHONY: distclean |
82 .PHONY: distclean |