--- a/Makefile Sun Mar 27 15:46:48 2016 +0300
+++ b/Makefile Sun Mar 27 15:52:13 2016 +0300
@@ -122,7 +122,8 @@
endif
endif
datarootdir := $(prefix)/share
-datadir = $(datarootdir)/dictd
+datadir := $(datarootdir)/dictd
+elispdir := $(datarootdir)/emacs/site-lisp
################################################################
# Project dirs/files.
@@ -331,10 +332,12 @@
.PHONY: install
install: $(DICTDZ_FILES) $(INDEX_FILES)
- mkdir -p $(datadir)
+ mkdir -p $(datadir) $(elispdir)
for f in $(DICTDZ_FILES) $(INDEX_FILES); do \
$(INSTALL_DATA) $$f $(datadir); \
done
+ $(INSTALL_DATA) contrib/gadict.el $(elispdir)
+ emacs -batch -f batch-byte-compile $(elispdir)/gadict.el
OLD_DICT_FILES := gadict-abbr.dict-c5 gadict-adjective-en-ru.dict-c5 \
gadict-adverb-en-ru.dict-c5 gadict-conjunction-en-ru.dict-c5 \
@@ -354,6 +357,7 @@
for f in $(OLD_DICTDZ_FILES) $(OLD_INDEX_FILES); do \
rm -f $(datadir)/$$f; \
done
+ rm -f $(elispdir)/gadict.el $(elispdir)/gadict.elc
################################################################
# Documentation targets.