author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 21 Oct 2019 20:50:36 +0300 | |
changeset 928 | 2b706bde17c2 |
parent 918 | 0cba37c54a9e |
child 952 | 04e8208374bd |
permissions | -rw-r--r-- |
602 | 1 |
|
2 |
################################################################ |
|
3 |
# Standard GNU Makefile settings. |
|
4 |
||
596
f6be61efe78f
Add 'dquilt' alias for Debian package development.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
592
diff
changeset
|
5 |
SHELL = /bin/sh -eu |
165
517623c39dac
Add work-around for PATH. Under Windows find.exe going in collision with
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
147
diff
changeset
|
6 |
export PATH := /bin:/usr/bin:${PATH} |
0 | 7 |
|
166
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
8 |
# Disable built in pattern rules. |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
9 |
MAKEFLAGS += -r |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
10 |
# Disable built in variables. |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
11 |
MAKEFLAGS += -R |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
12 |
# Disable built in suffix rules. |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
13 |
.SUFFIXES: |
602 | 14 |
# Delete target file if command fails. |
15 |
.DELETE_ON_ERROR: |
|
166
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
16 |
# Default target. |
217
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
17 |
.DEFAULT_GOAL = help |
166
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
18 |
|
249 | 19 |
################################################################ |
914
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
20 |
# Config. |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
21 |
|
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
22 |
CFG_FILE := Makefile.cfg |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
23 |
include $(CFG_FILE) |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
24 |
|
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
25 |
# Override defaults. |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
26 |
CFG_LOCAL_FILE := Makefile.cfg.override |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
27 |
-include $(CFG_LOCAL_FILE) |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
28 |
|
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
29 |
################################################################ |
249 | 30 |
# Platform definition. |
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
31 |
|
0 | 32 |
ifeq '' '$(HOME)' |
12
52322e5cc6bb
Proper determine Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2
diff
changeset
|
33 |
$(error HOME env var not set!) |
0 | 34 |
endif |
35 |
||
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
36 |
uname-s := $(shell uname -s) |
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
37 |
|
2
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
38 |
host_os = linux |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
39 |
ifneq '' '$(filter CYGWIN%,$(uname-s))' |
249 | 40 |
host_os = cygwin |
41 |
endif |
|
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
42 |
ifeq 'SunOS' '$(uname-s)' |
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
43 |
host_os = solaris |
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
44 |
endif |
249 | 45 |
|
46 |
################################################################ |
|
47 |
# Build tool definition/switches. |
|
48 |
||
910
60635dc58066
Create missing directories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
905
diff
changeset
|
49 |
INSTALL_DATA := install -m 640 -D |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
50 |
ifeq '$(host_os)' 'solaris' |
910
60635dc58066
Create missing directories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
905
diff
changeset
|
51 |
INSTALL_DATA := ginstall -m 640 -D |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
52 |
endif |
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
53 |
|
249 | 54 |
RST2HTML = rst2html |
55 |
ifeq '$(host_os)' 'cygwin' |
|
56 |
RST2HTML = rst2html.py |
|
2
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
57 |
endif |
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
58 |
|
218 | 59 |
################################################################ |
60 |
# Project dirs/files. |
|
61 |
||
427
59627b533219
Merge ".fvwm" project into "skel" project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
329
diff
changeset
|
62 |
OVERRIDDEN_ITEMS := \ |
683
d95d6ab31a4a
Fix Fvwm maximize window problem with stalonetray.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
655
diff
changeset
|
63 |
.fvwm .xxkbrc .xmodmaprc .stalonetrayrc \ |
914
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
64 |
.inputrc .Xdefaults .xinitrc .xserverrc .screenrc \ |
886
74f10c613c59
Added colors definition for cdiff because default schema uses blue for added
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
817
diff
changeset
|
65 |
.dircolors .colordiffrc \ |
653
a5566b182446
Use .env file as common env var settings for Bash and Zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
649
diff
changeset
|
66 |
.env .bashrc .bash_completion .bash_completion.d .zshrc .vimrc .ssh \ |
700
45c5d320d322
http://stackoverflow.com/questions/24454076/how-to-force-gradle-to-use-share-m2-repository-with-maven-system-wide/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
692
diff
changeset
|
67 |
.pylintrc .pystartup .tclshrc .npmrc .guile \ |
887
de60305d351e
Do not override ~/.gradle/init.d/mavenLocal.gradle
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
886
diff
changeset
|
68 |
.gradle/init.d/springColorLogging.gradle \ |
928
2b706bde17c2
Enable switching to wide line format of SQL output when necessary by psql.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
918
diff
changeset
|
69 |
.sqshrc .psqlrc \ |
234
420c06da8fd1
Fix mail signature file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
229
diff
changeset
|
70 |
.signature .muttrc .tidy \ |
188 | 71 |
.dictrc \ |
596
f6be61efe78f
Add 'dquilt' alias for Debian package development.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
592
diff
changeset
|
72 |
.hgrc .hgignore .hgstyle .bazaar .gitconfig .gitignore .cvsrc .quiltrc .quiltrc-dpkg \ |
293 | 73 |
.gnupg \ |
616
e3dd5c39cceb
Colorizer for java logs...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
611
diff
changeset
|
74 |
.ackrc .grc \ |
790
aab9b6f83061
New mplayer2 uses old ~/.mplayer config directory for now.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
760
diff
changeset
|
75 |
.mplayer \ |
293 | 76 |
.glhackrc |
87
63b568f99e3c
Install manually Midnight Commander ini files as for Cygwin and Debian
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
79
diff
changeset
|
77 |
MANUALINSTALL_ITEMS = .mc |
117
02b91508db83
Add svn user config.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
116
diff
changeset
|
78 |
IFNONEXIST_ITEMS = .wgetrc .subversion |
2
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
79 |
|
249 | 80 |
RST_FILES = $(wildcard *.rst) |
81 |
HTML_FILES = $(RST_FILES:.rst=.html) |
|
82 |
||
918
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
83 |
TARBALL_MINI := skel-mini.tar.gz |
904
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
84 |
|
249 | 85 |
################################################################ |
86 |
# Build targets. |
|
87 |
||
88 |
.PHONY: all |
|
89 |
all: |
|
90 |
||
918
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
91 |
.PHONY: dist-mini |
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
92 |
dist-mini: $(TARBALL_MINI) |
904
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
93 |
|
918
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
94 |
define TARBALL_MINI_DEPS |
904
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
95 |
.bashrc .env .bash_completion \ |
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
96 |
.inputrc .dircolors \ |
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
97 |
.gitconfig .gitignore .hgrc .hgignore .hgstyle |
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
98 |
endef |
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
99 |
|
918
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
100 |
$(TARBALL_MINI): $(TARBALL_MINI_DEPS) |
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
101 |
tar zcf $(TARBALL_MINI) $(TARBALL_MINI_DEPS) |
904
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
102 |
|
218 | 103 |
################################################################ |
104 |
# Install/uninstall targets. |
|
105 |
||
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
106 |
.PHONY: install |
0 | 107 |
install: |
76
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
108 |
for item in $(OVERRIDDEN_ITEMS); do \ |
21 | 109 |
if [ -f $$item ]; then \ |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
110 |
$(INSTALL_DATA) $$item $(HOME)/$$item; \ |
21 | 111 |
fi; \ |
112 |
if [ -d $$item ]; then \ |
|
113 |
for file in `find $$item`; do \ |
|
114 |
if [ -d $$file ]; then \ |
|
77
46f5f10ec084
Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
76
diff
changeset
|
115 |
mkdir -p $(HOME)/$$file; \ |
46f5f10ec084
Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
76
diff
changeset
|
116 |
continue; \ |
21 | 117 |
fi; \ |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
118 |
$(INSTALL_DATA) $$file $(HOME)/$$file; \ |
21 | 119 |
done; \ |
120 |
fi; \ |
|
2
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
121 |
done |
592
b472ec1324d1
Fix: gpg: failed to create temporary file `/home/user/.gnupg/.#lk0x23b70e0.desktop.22780': Permission denied
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
543
diff
changeset
|
122 |
chmod 700 ~/.gnupg/ |
733
32379c87626c
Reduced .xinit to test Fvwm in Xnest.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
715
diff
changeset
|
123 |
chmod a+x ~/.fvwm/FvwmKbdd.pl ~/.fvwm/xinit |
692
94abd8fa5462
Fix errors when some utilities not present.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
683
diff
changeset
|
124 |
command -v fvwm || exit 0; \ |
506
0ab510cb567d
Add xdg to Fvwm menus converter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
486
diff
changeset
|
125 |
for f in /etc/xdg/menus/*.menu; do \ |
518
3dd43161fc0e
Pass full path to menu file. Also pass Fvwm menu entry name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
506
diff
changeset
|
126 |
[ -f "$$f" ] || continue; \ |
3dd43161fc0e
Pass full path to menu file. Also pass Fvwm menu entry name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
506
diff
changeset
|
127 |
fname=$${f%.menu}; \ |
3dd43161fc0e
Pass full path to menu file. Also pass Fvwm menu entry name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
506
diff
changeset
|
128 |
fname=$${fname##*/}; \ |
3dd43161fc0e
Pass full path to menu file. Also pass Fvwm menu entry name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
506
diff
changeset
|
129 |
python .fvwm/xdg2fvwm.py Menu-$$fname $$f >~/.fvwm/$$fname.hook; \ |
3dd43161fc0e
Pass full path to menu file. Also pass Fvwm menu entry name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
506
diff
changeset
|
130 |
echo "Read $$[HOME]/.fvwm/$$fname.hook" >>~/.fvwm/config; \ |
3dd43161fc0e
Pass full path to menu file. Also pass Fvwm menu entry name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
506
diff
changeset
|
131 |
echo "AddToMenu MenuMyRoot $$fname Popup Menu-$$fname" >>~/.fvwm/config; \ |
506
0ab510cb567d
Add xdg to Fvwm menus converter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
486
diff
changeset
|
132 |
done |
486
8e5f69997c86
Create .screenshot directory.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
480
diff
changeset
|
133 |
mkdir -p ~/.screenshot |
76
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
134 |
for item in $(IFNONEXIST_ITEMS); do \ |
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
135 |
if [ -f $$item -a ! -f $(HOME)/$$item ]; then \ |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
136 |
$(INSTALL_DATA) $$item $(HOME)/$$item; \ |
76
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
137 |
fi; \ |
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
138 |
if [ -d $$item ]; then \ |
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
139 |
for file in `find $$item`; do \ |
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
140 |
if [ -d $$file ]; then \ |
77
46f5f10ec084
Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
76
diff
changeset
|
141 |
mkdir -p $(HOME)/$$file; \ |
46f5f10ec084
Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
76
diff
changeset
|
142 |
continue; \ |
76
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
143 |
fi; \ |
77
46f5f10ec084
Don't check for existence of source file/dir as find return only existing ones.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
76
diff
changeset
|
144 |
if [ ! -f $(HOME)/$$file ]; then \ |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
145 |
$(INSTALL_DATA) $$file $(HOME)/$$file; \ |
76
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
146 |
fi; \ |
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
147 |
done; \ |
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
148 |
fi; \ |
85dc8b07017a
Allow installation of file which can be modified by user so you do not lose
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
149 |
done |
287
fa17ae49bfff
Add execute permission to '.xinitrc' to use Bash script language instead of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
286
diff
changeset
|
150 |
chmod a+x ~/.xinitrc ~/.xserverrc |
278
b6adff7cbcb1
Fix "ln: creating symbolic link `/home/user/.xsession': File exists".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
275
diff
changeset
|
151 |
rm -f ~/.xsession |
275
2f79af90c708
ln -s ~/.xinitrc ~/.xsession
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
152 |
ln -s ~/.xinitrc ~/.xsession |
449
63fe7a1ebae4
Load custom settings (user editable).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
443
diff
changeset
|
153 |
rm -f ~/.bash_profile |
905
90d1d342a896
Make copy of ~/.bash_profile instead symlink as Cygwin installation conflicts
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
904
diff
changeset
|
154 |
cp ~/.bashrc ~/.bash_profile |
816
bbadb46574c4
Fix: Under Windows there is mc command that is Macro Compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
802
diff
changeset
|
155 |
command -v /usr/bin/mc || exit 0; \ |
817
257a65e63780
Fix: Under Windows there is mc command that is Message Compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
816
diff
changeset
|
156 |
v=`/usr/bin/mc --version | sed 's|.*\([0-9]\+\.[0-9]\+\.[0-9]\+\)$$|\1|;q'`; \ |
324
e30f2ac488aa
Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
312
diff
changeset
|
157 |
vmajor=$${v%%.*}; \ |
e30f2ac488aa
Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
312
diff
changeset
|
158 |
vminor=$${v#*.}; \ |
e30f2ac488aa
Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
312
diff
changeset
|
159 |
vminor=$${vminor%.*}; \ |
e30f2ac488aa
Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
312
diff
changeset
|
160 |
if [ $$vmajor -gt 4 -o '(' $$vmajor -eq 4 -a $$vminor -ge 8 ')' ]; then \ |
e30f2ac488aa
Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
312
diff
changeset
|
161 |
mkdir -p $(HOME)/.config/mc $(HOME)/.local/share/mc/; \ |
611
54de7fabecd7
Setting umask before mkdir broke directories permission.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
602
diff
changeset
|
162 |
umask 0117; \ |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
163 |
$(INSTALL_DATA) .local/share/mc/bashrc $(HOME)/.local/share/mc/; \ |
443
fa394c932c09
Fix path to 'mc.ext'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
433
diff
changeset
|
164 |
cat .config/mc/mc.ext /etc/mc/mc.ext > $(HOME)/.config/mc/mc.ext; \ |
543
77f7344600cb
Edit file with Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
518
diff
changeset
|
165 |
{ \ |
77f7344600cb
Edit file with Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
518
diff
changeset
|
166 |
echo 'default/*'; \ |
77f7344600cb
Edit file with Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
518
diff
changeset
|
167 |
echo ' Open=file %f'; \ |
77f7344600cb
Edit file with Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
518
diff
changeset
|
168 |
echo ' Edit=[ `du -m %f | { read size rest; echo $$size; }` -le 4 ] && e %f || echo Too large file for Emacs...'; \ |
77f7344600cb
Edit file with Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
518
diff
changeset
|
169 |
} >>$(HOME)/.config/mc/mc.ext; \ |
324
e30f2ac488aa
Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
312
diff
changeset
|
170 |
else \ |
e30f2ac488aa
Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
312
diff
changeset
|
171 |
mkdir -p $(HOME)/.mc; \ |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
172 |
$(INSTALL_DATA) .local/share/mc/bashrc $(HOME)/.mc; \ |
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
173 |
$(INSTALL_DATA) .config/mc/mc.ext $(HOME)/.mc/bindings; \ |
324
e30f2ac488aa
Port MC config to 4.8.x version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
312
diff
changeset
|
174 |
fi |
802
d8ba282954cd
Fix: Solaris 'file' utility does not support '--compile' option and user
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
801
diff
changeset
|
175 |
ifneq '' '$(filter $(host_os),cygwin linux)' |
295 | 176 |
if command -v file 1>/dev/null; then \ |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
177 |
$(INSTALL_DATA) .magic $(HOME); \ |
295 | 178 |
cd $(HOME); \ |
179 |
file --compile -m .magic; \ |
|
180 |
fi |
|
802
d8ba282954cd
Fix: Solaris 'file' utility does not support '--compile' option and user
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
801
diff
changeset
|
181 |
endif |
760
882eddbb9615
Missing dir cause error during installation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
754
diff
changeset
|
182 |
mkdir -p $(HOME)/.local/share/applications/ |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
183 |
$(INSTALL_DATA) .local/share/applications/mimeapps.list $(HOME)/.local/share/applications/ |
914
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
184 |
sed -e 's=@CFG_FONT_SIZE@=$(CFG_FONT_SIZE)=' <.minttyrc >$(HOME)/.minttyrc |
0 | 185 |
|
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
186 |
.PHONY: uninstall |
0 | 187 |
uninstall: |
78 | 188 |
for item in $(OVERRIDDEN_ITEMS); do \ |
189 |
if [ -f $$item ]; then \ |
|
190 |
[ -f $(HOME)/$$file ] && rm -f $(HOME)/$$item; \ |
|
191 |
fi; \ |
|
192 |
if [ -d $$item ]; then \ |
|
193 |
for file in `find $$item -depth`; do \ |
|
194 |
if [ -d $$file ]; then \ |
|
195 |
rmdir $(HOME)/$$file || :; \ |
|
196 |
continue; \ |
|
197 |
fi; \ |
|
198 |
[ -f $(HOME)/$$file ] && rm $(HOME)/$$file; \ |
|
199 |
done; \ |
|
200 |
fi; \ |
|
201 |
done |
|
87
63b568f99e3c
Install manually Midnight Commander ini files as for Cygwin and Debian
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
79
diff
changeset
|
202 |
rm -f $(HOME)/.mc/bashrc $(HOME)/.mc/ini $(HOME)/.mc/bindings |
63b568f99e3c
Install manually Midnight Commander ini files as for Cygwin and Debian
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
79
diff
changeset
|
203 |
rmdir $(HOME)/.mc || : |
0 | 204 |
|
218 | 205 |
################################################################ |
249 | 206 |
# Docs targets. |
207 |
||
208 |
.PHONY: html |
|
209 |
html: $(HTML_FILES) |
|
210 |
||
211 |
# --stylesheet=rst.css |
|
212 |
$(HTML_FILES): %.html: %.rst |
|
213 |
$(RST2HTML) $*.rst $@ |
|
214 |
||
215 |
################################################################ |
|
218 | 216 |
# Clean targets. |
217 |
||
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
218 |
.PHONY: clean |
0 | 219 |
clean: |
904
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
220 |
rm -f $(HTML_FILES) $(TARBALL) |
0 | 221 |
|
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
222 |
.PHONY: distclean |
0 | 223 |
distclean: clean |
217
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
224 |
|
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
225 |
################################################################ |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
226 |
# Helper target. |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
227 |
|
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
228 |
.PHONY: help |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
229 |
help: |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
230 |
@echo |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
231 |
@echo Supported targets: |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
232 |
@sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*= \1=;p;}' $(MAKEFILE_LIST) |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
233 |