25 F_TAB = $(patsubst %.tab_,%.tab,$(F_TAB_)) |
25 F_TAB = $(patsubst %.tab_,%.tab,$(F_TAB_)) |
26 FNAME = $(patsubst %.tab,%,$(F_TAB)) |
26 FNAME = $(patsubst %.tab,%,$(F_TAB)) |
27 F_DICT = $(patsubst %.tab,%.dict.dz,$(F_TAB)) |
27 F_DICT = $(patsubst %.tab,%.dict.dz,$(F_TAB)) |
28 F_IFO = $(patsubst %.tab,%.ifo,$(F_TAB)) |
28 F_IFO = $(patsubst %.tab,%.ifo,$(F_TAB)) |
29 |
29 |
|
30 .PHONY: all |
30 all: dist |
31 all: dist |
31 |
32 |
|
33 .PHONY: verify |
32 verify: dist |
34 verify: dist |
33 @echo |
35 @echo |
34 @for dic in $(F_IFO); do \ |
36 @for dic in $(F_IFO); do \ |
35 stardict_verify $$dic; \ |
37 stardict_verify $$dic; \ |
36 done |
38 done |
37 |
39 |
|
40 .PHONY: dist |
38 dist: $(F_DICT) |
41 dist: $(F_DICT) |
39 |
42 |
40 %.tab: %.tab_ |
43 %.tab: %.tab_ |
41 sed -e '/^#/d' -e 's_\\n _\\n_g' > $@ < $< |
44 sed -e '/^#/d' -e 's_\\n _\\n_g' > $@ < $< |
42 |
45 |
43 %.dict.dz: %.tab %.descr |
46 %.dict.dz: %.tab %.descr |
44 tabfile $< |
47 tabfile $< |
45 /bin/sh update-ifo.sh $*.ifo |
48 /bin/sh update-ifo.sh $*.ifo |
46 |
49 |
|
50 .PHONY: install |
47 install: dist |
51 install: dist |
48 mkdir -p $(dicdir) |
52 mkdir -p $(dicdir) |
49 for dic in $(FNAME); do \ |
53 for dic in $(FNAME); do \ |
50 install -m 644 $$dic.dict.dz $(dicdir); \ |
54 install -m 644 $$dic.dict.dz $(dicdir); \ |
51 install -m 644 $$dic.idx $(dicdir); \ |
55 install -m 644 $$dic.idx $(dicdir); \ |
52 install -m 644 $$dic.ifo $(dicdir); \ |
56 install -m 644 $$dic.ifo $(dicdir); \ |
53 done |
57 done |
54 |
58 |
|
59 .PHONY: uninstall |
55 uninstall: |
60 uninstall: |
56 rm -r -f $(dicdir) |
61 rm -r -f $(dicdir) |
57 |
62 |
58 .PHONY: install-local |
63 .PHONY: install-local |
59 install-local: |
64 install-local: |