author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Fri, 08 Jan 2021 13:12:40 +0200 | |
changeset 961 | d7b4c9d10b92 |
parent 960 | b4b2d30f6c97 |
child 962 | 88a1ce08b362 |
permissions | -rw-r--r-- |
602 | 1 |
|
2 |
################################################################ |
|
3 |
# Standard GNU Makefile settings. |
|
4 |
||
957
b491e9c375e7
Execute Make recipes by Bash.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
952
diff
changeset
|
5 |
SHELL = /bin/bash |
b491e9c375e7
Execute Make recipes by Bash.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
952
diff
changeset
|
6 |
.SHELLFLAGS = -xeuc |
165
517623c39dac
Add work-around for PATH. Under Windows find.exe going in collision with
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
147
diff
changeset
|
7 |
export PATH := /bin:/usr/bin:${PATH} |
0 | 8 |
|
166
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
9 |
# Disable built in pattern rules. |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
10 |
MAKEFLAGS += -r |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
11 |
# Disable built in variables. |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
12 |
MAKEFLAGS += -R |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
13 |
# Disable built in suffix rules. |
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
14 |
.SUFFIXES: |
602 | 15 |
# Delete target file if command fails. |
16 |
.DELETE_ON_ERROR: |
|
166
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
17 |
# Default target. |
217
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
18 |
.DEFAULT_GOAL = help |
166
27fc63b27dad
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
165
diff
changeset
|
19 |
|
249 | 20 |
################################################################ |
914
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
21 |
# Config. |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
22 |
|
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
23 |
CFG_FILE := Makefile.cfg |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
24 |
include $(CFG_FILE) |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
25 |
|
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
26 |
# Override defaults. |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
27 |
CFG_LOCAL_FILE := Makefile.cfg.override |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
28 |
-include $(CFG_LOCAL_FILE) |
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
29 |
|
0dba496629c9
Allow to override font size by local settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
910
diff
changeset
|
30 |
################################################################ |
249 | 31 |
# Platform definition. |
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
32 |
|
0 | 33 |
ifeq '' '$(HOME)' |
12
52322e5cc6bb
Proper determine Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2
diff
changeset
|
34 |
$(error HOME env var not set!) |
0 | 35 |
endif |
36 |
||
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
37 |
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
|
38 |
|
2
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
39 |
host_os = linux |
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
40 |
ifneq '' '$(filter CYGWIN%,$(uname-s))' |
249 | 41 |
host_os = cygwin |
42 |
endif |
|
801
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
43 |
ifeq 'SunOS' '$(uname-s)' |
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
44 |
host_os = solaris |
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
45 |
endif |
249 | 46 |
|
47 |
################################################################ |
|
48 |
# Build tool definition/switches. |
|
49 |
||
910
60635dc58066
Create missing directories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
905
diff
changeset
|
50 |
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
|
51 |
ifeq '$(host_os)' 'solaris' |
910
60635dc58066
Create missing directories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
905
diff
changeset
|
52 |
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
|
53 |
endif |
2657c198b9e2
Fix: GNU 'install' utility is not compatible with Solaris version.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
790
diff
changeset
|
54 |
|
249 | 55 |
RST2HTML = rst2html |
56 |
ifeq '$(host_os)' 'cygwin' |
|
57 |
RST2HTML = rst2html.py |
|
2
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
58 |
endif |
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
59 |
|
218 | 60 |
################################################################ |
61 |
# Project dirs/files. |
|
62 |
||
427
59627b533219
Merge ".fvwm" project into "skel" project.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
329
diff
changeset
|
63 |
OVERRIDDEN_ITEMS := \ |
683
d95d6ab31a4a
Fix Fvwm maximize window problem with stalonetray.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
655
diff
changeset
|
64 |
.fvwm .xxkbrc .xmodmaprc .stalonetrayrc \ |
952
04e8208374bd
Added Shift+Tab for session switching in GNU Screen & tmux.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
928
diff
changeset
|
65 |
.inputrc .Xdefaults .xinitrc .xserverrc \ |
04e8208374bd
Added Shift+Tab for session switching in GNU Screen & tmux.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
928
diff
changeset
|
66 |
.screenrc .tmux.conf \ |
886
74f10c613c59
Added colors definition for cdiff because default schema uses blue for added
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
817
diff
changeset
|
67 |
.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
|
68 |
.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
|
69 |
.pylintrc .pystartup .tclshrc .npmrc .guile \ |
887
de60305d351e
Do not override ~/.gradle/init.d/mavenLocal.gradle
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
886
diff
changeset
|
70 |
.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
|
71 |
.sqshrc .psqlrc \ |
234
420c06da8fd1
Fix mail signature file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
229
diff
changeset
|
72 |
.signature .muttrc .tidy \ |
188 | 73 |
.dictrc \ |
596
f6be61efe78f
Add 'dquilt' alias for Debian package development.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
592
diff
changeset
|
74 |
.hgrc .hgignore .hgstyle .bazaar .gitconfig .gitignore .cvsrc .quiltrc .quiltrc-dpkg \ |
293 | 75 |
.gnupg \ |
616
e3dd5c39cceb
Colorizer for java logs...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
611
diff
changeset
|
76 |
.ackrc .grc \ |
790
aab9b6f83061
New mplayer2 uses old ~/.mplayer config directory for now.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
760
diff
changeset
|
77 |
.mplayer \ |
293 | 78 |
.glhackrc |
87
63b568f99e3c
Install manually Midnight Commander ini files as for Cygwin and Debian
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
79
diff
changeset
|
79 |
MANUALINSTALL_ITEMS = .mc |
117
02b91508db83
Add svn user config.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
116
diff
changeset
|
80 |
IFNONEXIST_ITEMS = .wgetrc .subversion |
2
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
81 |
|
249 | 82 |
RST_FILES = $(wildcard *.rst) |
83 |
HTML_FILES = $(RST_FILES:.rst=.html) |
|
84 |
||
918
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
85 |
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
|
86 |
|
249 | 87 |
################################################################ |
88 |
# Build targets. |
|
89 |
||
90 |
.PHONY: all |
|
91 |
all: |
|
92 |
||
918
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
93 |
.PHONY: dist-mini |
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
94 |
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
|
95 |
|
918
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
96 |
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
|
97 |
.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
|
98 |
.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
|
99 |
.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
|
100 |
endef |
87a79ec44985
Target to create tarball with essential files (to be moved to Vagrant box).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
887
diff
changeset
|
101 |
|
918
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
102 |
$(TARBALL_MINI): $(TARBALL_MINI_DEPS) |
0cba37c54a9e
Added suffix mini to mini-tarball.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
914
diff
changeset
|
103 |
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
|
104 |
|
218 | 105 |
################################################################ |
106 |
# Install/uninstall targets. |
|
107 |
||
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
108 |
.PHONY: install |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
109 |
.ONESHELL: |
0 | 110 |
install: |
961
d7b4c9d10b92
Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
960
diff
changeset
|
111 |
declare -a files |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
112 |
for item in $(OVERRIDDEN_ITEMS); do |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
113 |
if [[ -f $$item ]]; then |
961
d7b4c9d10b92
Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
960
diff
changeset
|
114 |
if [[ $$item == */* ]]; then |
d7b4c9d10b92
Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
960
diff
changeset
|
115 |
$(INSTALL_DATA) $$item $(HOME)/$$item |
d7b4c9d10b92
Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
960
diff
changeset
|
116 |
else |
d7b4c9d10b92
Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
960
diff
changeset
|
117 |
files+=($$item) |
d7b4c9d10b92
Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
960
diff
changeset
|
118 |
fi |
d7b4c9d10b92
Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
960
diff
changeset
|
119 |
elif [[ -d $$item ]]; then |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
120 |
for file in `find $$item`; do |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
121 |
if [[ -d $$file ]]; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
122 |
mkdir -p $(HOME)/$$file |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
123 |
continue |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
124 |
fi |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
125 |
$(INSTALL_DATA) $$file $(HOME)/$$file |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
126 |
done |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
127 |
fi |
2
48e601bfbca6
Split files depend of OS. New install algorithm.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
128 |
done |
961
d7b4c9d10b92
Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
960
diff
changeset
|
129 |
$(INSTALL_DATA) -t $(HOME) "$${files[@]}" |
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
|
130 |
chmod 700 ~/.gnupg/ |
733
32379c87626c
Reduced .xinit to test Fvwm in Xnest.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
715
diff
changeset
|
131 |
chmod a+x ~/.fvwm/FvwmKbdd.pl ~/.fvwm/xinit |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
132 |
command -v fvwm || exit 0 |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
133 |
for f in /etc/xdg/menus/*.menu; do |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
134 |
[[ -f "$$f" ]] || continue |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
135 |
fname=$${f%.menu} |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
136 |
fname=$${fname##*/} |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
137 |
python .fvwm/xdg2fvwm.py Menu-$$fname $$f >~/.fvwm/$$fname.hook |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
138 |
echo "Read $$[HOME]/.fvwm/$$fname.hook" >>~/.fvwm/config |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
139 |
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
|
140 |
done |
486
8e5f69997c86
Create .screenshot directory.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
480
diff
changeset
|
141 |
mkdir -p ~/.screenshot |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
142 |
for item in $(IFNONEXIST_ITEMS); do |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
143 |
if [[ -f $$item ]] && ! [[ -f $(HOME)/$$item ]]; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
144 |
$(INSTALL_DATA) $$item $(HOME)/$$item |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
145 |
fi |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
146 |
if [[ -d $$item ]]; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
147 |
for file in `find $$item`; do |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
148 |
if [[ -d $$file ]]; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
149 |
mkdir -p $(HOME)/$$file |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
150 |
continue |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
151 |
fi |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
152 |
if [[ ! -f $(HOME)/$$file ]]; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
153 |
$(INSTALL_DATA) $$file $(HOME)/$$file |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
154 |
fi |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
155 |
done |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
156 |
fi |
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
|
157 |
done |
287
fa17ae49bfff
Add execute permission to '.xinitrc' to use Bash script language instead of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
286
diff
changeset
|
158 |
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
|
159 |
rm -f ~/.xsession |
275
2f79af90c708
ln -s ~/.xinitrc ~/.xsession
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
160 |
ln -s ~/.xinitrc ~/.xsession |
449
63fe7a1ebae4
Load custom settings (user editable).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
443
diff
changeset
|
161 |
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
|
162 |
cp ~/.bashrc ~/.bash_profile |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
163 |
mkdir -p $(HOME)/.config/mc $(HOME)/.local/share/mc/ |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
164 |
umask 0117 |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
165 |
$(INSTALL_DATA) .local/share/mc/bashrc $(HOME)/.local/share/mc/ |
959
25d27dfee90e
No need for file size check when opening file in Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
958
diff
changeset
|
166 |
cat .config/mc/mc.ext /etc/mc/mc.ext > $(HOME)/.config/mc/mc.ext |
802
d8ba282954cd
Fix: Solaris 'file' utility does not support '--compile' option and user
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
801
diff
changeset
|
167 |
ifneq '' '$(filter $(host_os),cygwin linux)' |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
168 |
if command -v file 1>/dev/null; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
169 |
$(INSTALL_DATA) .magic $(HOME) |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
170 |
cd $(HOME) |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
171 |
file --compile -m .magic |
295 | 172 |
fi |
802
d8ba282954cd
Fix: Solaris 'file' utility does not support '--compile' option and user
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
801
diff
changeset
|
173 |
endif |
760
882eddbb9615
Missing dir cause error during installation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
754
diff
changeset
|
174 |
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
|
175 |
$(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
|
176 |
sed -e 's=@CFG_FONT_SIZE@=$(CFG_FONT_SIZE)=' <.minttyrc >$(HOME)/.minttyrc |
0 | 177 |
|
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
178 |
.PHONY: uninstall |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
179 |
.ONESHELL: |
0 | 180 |
uninstall: |
960
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
181 |
for item in $(OVERRIDDEN_ITEMS); do |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
182 |
if [ -f $$item ]; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
183 |
[ -f $(HOME)/$$file ] && rm -f $(HOME)/$$item |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
184 |
fi |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
185 |
if [ -d $$item ]; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
186 |
for file in `find $$item -depth`; do |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
187 |
if [ -d $$file ]; then |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
188 |
rmdir $(HOME)/$$file || : |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
189 |
continue |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
190 |
fi |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
191 |
[ -f $(HOME)/$$file ] && rm $(HOME)/$$file |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
192 |
done |
b4b2d30f6c97
Increased "install" speed on Cygwin with ".ONESHELL" (by avoiding SHELL forks) 9s => 7s.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
959
diff
changeset
|
193 |
fi |
78 | 194 |
done |
87
63b568f99e3c
Install manually Midnight Commander ini files as for Cygwin and Debian
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
79
diff
changeset
|
195 |
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
|
196 |
rmdir $(HOME)/.mc || : |
0 | 197 |
|
218 | 198 |
################################################################ |
249 | 199 |
# Docs targets. |
200 |
||
201 |
.PHONY: html |
|
202 |
html: $(HTML_FILES) |
|
203 |
||
204 |
# --stylesheet=rst.css |
|
205 |
$(HTML_FILES): %.html: %.rst |
|
206 |
$(RST2HTML) $*.rst $@ |
|
207 |
||
208 |
################################################################ |
|
218 | 209 |
# Clean targets. |
210 |
||
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
211 |
.PHONY: clean |
0 | 212 |
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
|
213 |
rm -f $(HTML_FILES) $(TARBALL) |
0 | 214 |
|
13
9e590e7ef108
Adds .PHONY exactly before corresponding target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
12
diff
changeset
|
215 |
.PHONY: distclean |
0 | 216 |
distclean: clean |
217
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
217 |
|
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
218 |
################################################################ |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
219 |
# Helper target. |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
220 |
|
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
221 |
.PHONY: help |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
222 |
help: |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
223 |
@echo |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
224 |
@echo Supported targets: |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
225 |
@sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*= \1=;p;}' $(MAKEFILE_LIST) |
fdcf941346bb
Print supported targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
226 |