author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Thu, 12 Jan 2012 23:18:00 +0200 | |
changeset 107 | 4cfb94e11b5d |
parent 106 | 092b25d032af |
child 108 | 1f1363141da7 |
permissions | -rw-r--r-- |
85
0ff3715e6176
To build dictionary you need to install...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
68
diff
changeset
|
1 |
# To build dictionary you need to install: |
0ff3715e6176
To build dictionary you need to install...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
68
diff
changeset
|
2 |
# |
0ff3715e6176
To build dictionary you need to install...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
68
diff
changeset
|
3 |
# $ sudo apt-get install dictfmt |
0ff3715e6176
To build dictionary you need to install...
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
68
diff
changeset
|
4 |
# |
22
0616adf6e983
Describe available build target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
21
diff
changeset
|
5 |
# Available target: |
0616adf6e983
Describe available build target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
21
diff
changeset
|
6 |
# |
0616adf6e983
Describe available build target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
21
diff
changeset
|
7 |
# all build dictionaries |
0616adf6e983
Describe available build target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
21
diff
changeset
|
8 |
# install install dictionaries, so they been available in stardict, may require root permission |
0616adf6e983
Describe available build target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
21
diff
changeset
|
9 |
# uninstall remove dictionaries, they been unavailable in stardict, may require root permission |
0616adf6e983
Describe available build target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
21
diff
changeset
|
10 |
# install-local install dictionaries in user HOME dir, so they been available in stardict for that user |
0616adf6e983
Describe available build target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
21
diff
changeset
|
11 |
# uninstall-local remove dictionaries from user HOME directory |
26
6dfc4ac2dc80
Back targets that allow make symlink to dictionaries install dir from user HOME dir.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
23
diff
changeset
|
12 |
# install-local-symlink create symlink from installed dir to user HOME dir, so dictionaries been available in stardict |
6dfc4ac2dc80
Back targets that allow make symlink to dictionaries install dir from user HOME dir.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
23
diff
changeset
|
13 |
# uninstall-local-symlink remove symlink from user HOME directory |
22
0616adf6e983
Describe available build target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
21
diff
changeset
|
14 |
|
36
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
15 |
SHELL = /bin/sh |
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
16 |
export PATH := /bin:/usr/bin:${PATH} |
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
17 |
|
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
18 |
# Disable built in pattern rules. |
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
19 |
MAKEFLAGS += -r |
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
20 |
# Disable built in variables. |
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
21 |
MAKEFLAGS += -R |
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
22 |
# Disable built in suffix rules. |
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
23 |
.SUFFIXES: |
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
24 |
# Default target. |
106
092b25d032af
Set 'help' as default target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
105
diff
changeset
|
25 |
.DEFAULT_GOAL = help |
36
6fee90eb2d85
Add default Makefile settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
26 |
|
54 | 27 |
################################################################ |
103 | 28 |
# Version extracting/generation. |
29 |
||
30 |
# Prevent from deploying and distributing with wrong version. |
|
31 |
ifneq '' '$(filter deploy%,$(MAKECMDGOALS))' |
|
32 |
ifeq '' '$(MAKE_RESTARTS)' |
|
33 |
$(info $(shell rm VERSION)) |
|
34 |
endif |
|
35 |
endif |
|
36 |
||
37 |
# Here are vmajor and vminor. Look README section "Versioning rules." |
|
38 |
-include VERSION |
|
39 |
||
40 |
VERSION: |
|
41 |
ver=$$(hg log -r . --template '{latesttag}'); \ |
|
42 |
ver=$${ver#t}; \ |
|
43 |
major=$${ver%.*}; \ |
|
44 |
minor=$${ver#*.}; \ |
|
45 |
printf "vmajor=%s\nvminor=%s\n" $$major $$minor >VERSION |
|
46 |
# is_release=`hg log --template '{latesttagdistance}'` |
|
47 |
||
48 |
################################################################ |
|
106
092b25d032af
Set 'help' as default target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
105
diff
changeset
|
49 |
# Determine platform/environment. |
66 | 50 |
|
51 |
host_os = unix |
|
52 |
ifneq '' '$(COMSPEC)' |
|
53 |
ifneq '' '$(WINDIR)' |
|
54 |
# Probably under Windows. |
|
55 |
host_os = windows |
|
107
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
56 |
ifneq '' '$(wildcard /etc/setup/*cygwin*)' |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
57 |
# Probably under Cygwin. |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
58 |
host_os = cygwin |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
59 |
endif |
66 | 60 |
endif |
61 |
endif |
|
62 |
||
63 |
################################################################ |
|
107
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
64 |
# Build tools definition/switches. |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
65 |
|
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
66 |
RST_WARNING_FLAGS := --halt warning |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
67 |
RST_FLAGS := --strip-comments |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
68 |
RST_FLAGS += $(RST_WARNING_FLAGS) |
66 | 69 |
|
107
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
70 |
RST2HTML := rst2html |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
71 |
ifeq '$(host_os)' 'cygwin' |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
72 |
RST2HTML := rst2html.py |
66 | 73 |
endif |
107
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
74 |
RST2HTML_FLAGS := $(RST_FLAGS) |
66 | 75 |
|
76 |
################################################################ |
|
54 | 77 |
# Install paths. |
0 | 78 |
|
41
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
79 |
ifeq '$(origin prefix)' 'undefined' |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
80 |
ifeq '$(shell id -u)' '0' |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
81 |
prefix = /usr/local |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
82 |
else |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
83 |
prefix = $(HOME)/usr |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
84 |
endif |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
85 |
endif |
0 | 86 |
datarootdir = $(prefix)/share |
41
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
87 |
datadir = $(datarootdir)/dictd |
0 | 88 |
|
54 | 89 |
################################################################ |
66 | 90 |
# Project dirs/files. |
21
d4b27e5b7a4b
Added per user install target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
20
diff
changeset
|
91 |
|
107
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
92 |
BUILD_SCRIPT := $(first-word $(MAKEFILE_LIST)) |
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
93 |
|
50
37931fbb857f
Switch from ambiguous extension to unambiguous.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
46
diff
changeset
|
94 |
C5_FILES := $(wildcard *.dict-c5) |
37931fbb857f
Switch from ambiguous extension to unambiguous.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
46
diff
changeset
|
95 |
DICT_FILES := $(C5_FILES:.dict-c5=.dict) |
37931fbb857f
Switch from ambiguous extension to unambiguous.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
46
diff
changeset
|
96 |
DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz) |
37931fbb857f
Switch from ambiguous extension to unambiguous.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
46
diff
changeset
|
97 |
INDEX_FILES := $(C5_FILES:.dict-c5=.index) |
1
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
98 |
|
66 | 99 |
RST_FILES := $(wildcard *.rst) |
100 |
HTML_FILES := $(RST_FILES:.rst=.html) |
|
101 |
||
103 | 102 |
name = gadict |
103 |
fullpkgname = $(name)-$(vmajor).$(vminor) |
|
104 |
||
105 |
DIST_DIR = $(fullpkgname) |
|
106 |
DISTSRC_DIR = $(fullpkgname)_src |
|
107 |
||
108 |
DIST_FILES = $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES) $(RST_FILES) VERSION |
|
109 |
||
110 |
DISTSRC_HELPER_FILES = VERSION Makefile rst.css .dir-locals.el |
|
111 |
DISTSRC_FILES = $(HTML_FILES) $(RST_FILES) $(DISTSRC_HELPER_FILES) |
|
112 |
||
113 |
################################################################ |
|
114 |
# Dist targets. |
|
115 |
||
116 |
.PHONY: dist |
|
117 |
dist: dist-dictd dist-src |
|
118 |
||
105
35cc545ec03d
'clean'-like targets delete artefacts after 'dist' targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
103
diff
changeset
|
119 |
DIST_TARBALLS = $(DIST_DIR).tar.gz $(DIST_DIR).tar.bz2 |
35cc545ec03d
'clean'-like targets delete artefacts after 'dist' targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
103
diff
changeset
|
120 |
DISTSRC_TARBALLS = $(DISTSRC_DIR).tar.gz $(DISTSRC_DIR).tar.bz2 |
35cc545ec03d
'clean'-like targets delete artefacts after 'dist' targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
103
diff
changeset
|
121 |
|
103 | 122 |
.PHONY: dist-dictd |
105
35cc545ec03d
'clean'-like targets delete artefacts after 'dist' targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
103
diff
changeset
|
123 |
dist-dictd: $(DIST_TARBALLS) |
103 | 124 |
|
125 |
.PHONY: dist-src |
|
105
35cc545ec03d
'clean'-like targets delete artefacts after 'dist' targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
103
diff
changeset
|
126 |
dist-src: $(DISTSRC_TARBALLS) |
103 | 127 |
|
128 |
%.tar.gz: % |
|
129 |
tar zcf $*.tar.gz $* |
|
130 |
||
131 |
%.tar.bz2: % |
|
132 |
tar jcf $*.tar.bz2 $* |
|
133 |
||
134 |
$(DIST_DIR): $(DIST_FILES) |
|
135 |
rm -rf $@ |
|
136 |
mkdir $@ |
|
137 |
cp $(DIST_FILES) $@ |
|
138 |
||
139 |
$(DISTSRC_DIR): $(DISTSRC_FILES) |
|
140 |
rm -rf $@ |
|
141 |
mkdir $@ |
|
142 |
cp $(DISTSRC_FILES) $@ |
|
143 |
||
54 | 144 |
################################################################ |
145 |
# Build targets. |
|
0 | 146 |
|
23
946ae4b96419
Phony targets marked.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
22
diff
changeset
|
147 |
.PHONY: all |
0 | 148 |
all: dist |
149 |
||
41
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
150 |
.PHONY: dist |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
151 |
dist: $(DICTDZ_FILES) $(INDEX_FILES) |
0 | 152 |
|
41
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
153 |
# --case-sensitive |
50
37931fbb857f
Switch from ambiguous extension to unambiguous.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
46
diff
changeset
|
154 |
%.dict %.index: %.dict-c5 |
46
86c0184efac7
Comment syntax convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
41
diff
changeset
|
155 |
sed '/^#/d' $< | dictfmt -c5 \ |
41
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
156 |
--headword-separator '; ' --break-headwords \ |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
157 |
--utf8 --allchars \ |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
158 |
-u "`sed -n '\|http://[[:print:]]\+/|{s=^.*\(http://\)=\1=;p;q;}' $<`" \ |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
159 |
-s "`sed -n '/^ABOUT: /{s=ABOUT: ==;p;q;}' $<`" \ |
46
86c0184efac7
Comment syntax convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
41
diff
changeset
|
160 |
$* |
0 | 161 |
|
41
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
162 |
%.dict.dz: %.dict |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
163 |
dictzip -c $< >$@ |
1
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
164 |
|
54 | 165 |
################################################################ |
166 |
# Install/uninstall targets. |
|
0 | 167 |
|
23
946ae4b96419
Phony targets marked.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
22
diff
changeset
|
168 |
.PHONY: install |
0 | 169 |
install: dist |
41
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
170 |
mkdir -p $(datadir) |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
171 |
for f in $(DICTDZ_FILES) $(INDEX_FILES); do \ |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
172 |
install -m 644 $$f $(datadir); \ |
0 | 173 |
done |
174 |
||
23
946ae4b96419
Phony targets marked.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
22
diff
changeset
|
175 |
.PHONY: uninstall |
0 | 176 |
uninstall: |
41
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
177 |
for f in $(DICTDZ_FILES) $(INDEX_FILES); do \ |
8f1dc5d77f3d
Switch dictionary to dictd -c5 format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
178 |
rm -f $(datadir)/$$f; \ |
21
d4b27e5b7a4b
Added per user install target.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
20
diff
changeset
|
179 |
done |
13
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
180 |
|
54 | 181 |
################################################################ |
66 | 182 |
# Documentation targets. |
183 |
||
184 |
.PHONY: html |
|
185 |
html: $(HTML_FILES) |
|
186 |
||
187 |
$(HTML_FILES): %.html: %.rst |
|
107
4cfb94e11b5d
Add warning flags to 'rst2html'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
188 |
$(RST2HTML) $(RST2HTML_FLAGS) --stylesheet=rst.css $*.rst $@ |
66 | 189 |
|
190 |
################################################################ |
|
94
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
191 |
# Statistics targets. |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
192 |
|
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
193 |
.PHONY: stat |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
194 |
stat: |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
195 |
total=0; \ |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
196 |
for dic in *.dict-c5; do \ |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
197 |
cnt=`grep '^_____' $$dic | wc -l`; \ |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
198 |
echo $$dic 'has ' $$cnt words.; \ |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
199 |
total=$$(($$total + $$cnt)); \ |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
200 |
done; \ |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
201 |
echo Total words count is $$total. |
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
202 |
|
1b2cf5b2b46c
Add target that print statistics about word count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
85
diff
changeset
|
203 |
################################################################ |
54 | 204 |
# Clean targets. |
205 |
||
23
946ae4b96419
Phony targets marked.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
22
diff
changeset
|
206 |
.PHONY: distclean |
946ae4b96419
Phony targets marked.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
22
diff
changeset
|
207 |
distclean: clean |
105
35cc545ec03d
'clean'-like targets delete artefacts after 'dist' targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
103
diff
changeset
|
208 |
rm -f VERSION |
13
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
209 |
|
23
946ae4b96419
Phony targets marked.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
22
diff
changeset
|
210 |
.PHONY: clean |
0 | 211 |
clean: |
68 | 212 |
rm -f $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES) |
105
35cc545ec03d
'clean'-like targets delete artefacts after 'dist' targets.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
103
diff
changeset
|
213 |
rm -rf $(DIST_DIR) $(DISTSRC_DIR) $(DIST_TARBALLS) $(DISTSRC_TARBALLS) |
63 | 214 |
|
215 |
################################################################ |
|
216 |
# Helper target. |
|
217 |
||
218 |
.PHONY: help |
|
219 |
help: |
|
220 |
@echo |
|
221 |
@echo Supported targets: |
|
222 |
@sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*= \1=;p;}' $(MAKEFILE_LIST) |
|
223 |