Исключения для ea.
# Available target:
#
# all build dictionaries
# install install dictionaries, so they been available in stardict, may require root permission
# uninstall remove dictionaries, they been unavailable in stardict, may require root permission
# install-local install dictionaries in user HOME dir, so they been available in stardict for that user
# uninstall-local remove dictionaries from user HOME directory
# install-local-symlink create symlink from installed dir to user HOME dir, so dictionaries been available in stardict
# uninstall-local-symlink remove symlink from user HOME directory
# On Debian Etch 'stardict-tools' package not placed tools in any system bin dir.
export PATH := $(PATH):/usr/lib/stardict-tools
DICSETNAME = gavenkoa-dicts
prefix = /usr/local
datarootdir = $(prefix)/share
datadir = $(datarootdir)/stardict
dicdir = $(datadir)/dic/$(DICSETNAME)
# Per user dictionaries hold in user HOME directory.
dicdir-local = $(HOME)/.stardict/dic/$(DICSETNAME)
F_TAB_ = $(wildcard *.tab_)
F_TAB = $(patsubst %.tab_,%.tab,$(F_TAB_))
FNAME = $(patsubst %.tab,%,$(F_TAB))
F_DICT = $(patsubst %.tab,%.dict.dz,$(F_TAB))
F_IFO = $(patsubst %.tab,%.ifo,$(F_TAB))
.PHONY: all
all: dist
.PHONY: verify
verify: dist
@echo
@for dic in $(F_IFO); do \
stardict_verify $$dic; \
done
.PHONY: dist
dist: $(F_DICT)
%.tab: %.tab_
sed -e '/^#/d' -e 's_\\n _\\n_g' > $@ < $<
%.dict.dz: %.tab %.descr
tabfile $<
/bin/sh update-ifo.sh $*.ifo
.PHONY: install
install: dist
mkdir -p $(dicdir)
for dic in $(FNAME); do \
install -m 644 $$dic.dict.dz $(dicdir); \
install -m 644 $$dic.idx $(dicdir); \
install -m 644 $$dic.ifo $(dicdir); \
done
.PHONY: uninstall
uninstall:
rm -r -f $(dicdir)
.PHONY: install-local-symlink
install-local-symlink: # Assume use run "make install" before.
mkdir -p $(HOME)/.stardict/dic
ln -s $(dicdir) $(HOME)/.stardict/dic/$(DICSETNAME)
.PHONY: uninstall-local-symlink
uninstall-local-symlink: # Assume use run "make uninstall" before.
rm -f $(HOME)/.stardict/dic/$(DICSETNAME)
.PHONY: install-local
install-local: dist
mkdir -p $(dicdir-local)
for dic in $(FNAME); do \
install -m 644 $$dic.dict.dz $(dicdir-local); \
install -m 644 $$dic.idx $(dicdir-local); \
install -m 644 $$dic.ifo $(dicdir-local); \
done
.PHONY: uninstall-local
uninstall-local:
rm -f -r $(HOME)/.stardict/dic/$(DICSETNAME)
.PHONY: clean
clean:
for dic in $(FNAME); do \
rm -f $$dic.dict.dz $$dic.idx $$dic.ifo $$dic.tab; \
done
.PHONY: distclean
distclean: clean