author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Thu, 06 Aug 2009 17:06:28 +0300 | |
changeset 14 | a1a505947f5e |
parent 13 | d0e948499faf |
child 20 | 9f5eedd08178 |
permissions | -rw-r--r-- |
0 | 1 |
|
1
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
2 |
# On Debian Etch 'stardict-tools' package not placed tools in any system bin dir. |
0 | 3 |
export PATH := $(PATH):/usr/lib/stardict-tools |
4 |
||
5 |
DICSETNAME = gavenkoa-dicts |
|
6 |
||
7 |
prefix = /usr/local |
|
8 |
datarootdir = $(prefix)/share |
|
9 |
datadir = $(datarootdir)/stardict |
|
10 |
dicdir = $(datadir)/dic/$(DICSETNAME) |
|
11 |
||
1
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
12 |
F_TAB_ = $(wildcard *.tab_) |
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
13 |
|
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
14 |
F_TAB = $(patsubst %.tab_,%.tab,$(F_TAB_)) |
0 | 15 |
FNAME = $(patsubst %.tab,%,$(F_TAB)) |
16 |
F_DICT = $(patsubst %.tab,%.dict.dz,$(F_TAB)) |
|
17 |
F_IFO = $(patsubst %.tab,%.ifo,$(F_TAB)) |
|
18 |
||
19 |
all: dist |
|
20 |
||
21 |
verify: dist |
|
22 |
@echo |
|
23 |
@for dic in $(F_IFO); do \ |
|
24 |
stardict_verify $$dic; \ |
|
25 |
done |
|
26 |
||
27 |
dist: $(F_DICT) |
|
28 |
||
1
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
29 |
%.tab: %.tab_ |
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
30 |
sed 's_\\n _\\n_g' > $@ < $< |
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
31 |
|
9
976f8876799d
Added forgotten dependence.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
3
diff
changeset
|
32 |
%.dict.dz: %.tab %.descr |
0 | 33 |
tabfile $< |
3
cc5593c28a4b
Update .ifo file with author/date/description info.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1
diff
changeset
|
34 |
/bin/sh update-ifo.sh $*.ifo |
0 | 35 |
|
36 |
install: dist |
|
37 |
mkdir -p $(dicdir) |
|
38 |
for dic in $(FNAME); do \ |
|
39 |
install -m 644 $$dic.dict.dz $(dicdir); \ |
|
40 |
install -m 644 $$dic.idx $(dicdir); \ |
|
41 |
install -m 644 $$dic.ifo $(dicdir); \ |
|
42 |
done |
|
43 |
||
44 |
uninstall: |
|
45 |
rm -r -f $(dicdir) |
|
46 |
||
13
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
47 |
install-user: install |
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
48 |
mkdir -p $(HOME)/.stardict/dic |
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
49 |
ln -s $(dicdir) $(HOME)/.stardict/dic/$(DICSETNAME) |
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
50 |
|
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
51 |
uninstall-user: uninstall |
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
52 |
rm -f $(HOME)/.stardict/dic/$(DICSETNAME) |
d0e948499faf
Added targets [un]install-user to proper install dict for current user.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
9
diff
changeset
|
53 |
|
0 | 54 |
clean: |
55 |
for dic in $(FNAME); do \ |
|
1
b23e948de24a
Make article for all verbs form.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
56 |
rm -f $$dic.dict.dz $$dic.idx $$dic.ifo $$dic.tab; \ |
0 | 57 |
done |