Support regeneration of ja-dic.el under '--with-small-ja-dic'

* lisp/international/ja-dic-cnv.el (skkdic-convert): Record the
value of SMALL_JA_DIC option used to produce ja-dic.el.
* leim/Makefile.in (small-ja-dic-option): New target, triggers
regeneration of ja-dic.el when the value of SMALL_JA_DIC option
changes by the configure script.  Suggested by Ulrich Mueller
<ulm@gentoo.org>.
(${leimdir}/ja-dic/ja-dic.el): Depend on 'small-ja-dic-option'.
(Bug#66125)

* make-dist (possibly_non_vc_files):
* .gitignore: Add 'leim/small-ja-dic-option'.
This commit is contained in:
Eli Zaretskii 2023-09-24 15:30:01 +03:00
parent ead491d230
commit 7d5fee0fea
4 changed files with 12 additions and 1 deletions

1
.gitignore vendored
View file

@ -95,6 +95,7 @@ lisp/cedet/semantic/grammar-wy.el
lisp/eshell/esh-groups.el
lisp/finder-inf.el
lisp/leim/ja-dic/
leim/small-ja-dic-option
lisp/leim/leim-list.el
lisp/leim/quail/4Corner.el
lisp/leim/quail/ARRAY30.el

View file

@ -26,6 +26,7 @@ SHELL = @SHELL@
# Here are the things that we expect ../configure to edit.
srcdir=@srcdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Where the generated files go.
leimdir = ${srcdir}/../lisp/leim
@ -134,9 +135,15 @@ ${leimdir}/leim-list.el: ${srcdir}/leim-ext.el ${TIT_MISC}
${leimdir}/ja-dic/ja-dic.el: | $(leimdir)/ja-dic
# This is used to support regeneration of ja-dic when the SMALL_JA_DIC
# option is flipped by the configure-time option.
small-ja-dic-option: ../config.status
$(AM_V_GEN)echo "Small ja-dic option: $(SMALL_JA_DIC)" > $@.$$$$ && \
${top_srcdir}/build-aux/move-if-change $@.$$$$ $@
.PHONY: generate-ja-dic
generate-ja-dic: ${leimdir}/ja-dic/ja-dic.el
${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L small-ja-dic-option
$(AM_V_GEN)$(RUN_EMACS) -batch -l ja-dic-cnv \
-f batch-skkdic-convert -dir "$(leimdir)/ja-dic" $(JA_DIC_NO_REDUCTION_OPTION) "$<"

View file

@ -346,6 +346,8 @@ If NO-REDUCTION is non-nil, do not reduce the dictionary vocabulary."
(erase-buffer)
(buffer-disable-undo)
(generate-lisp-file-heading ja-dic-filename 'skkdic-convert :code nil)
(insert (format ";; Generated with small ja-dic option: %s\n\n"
(if no-reduction "no" "yes")))
(insert ";; Original SKK dictionary file: "
(file-relative-name (expand-file-name filename) dirname)
"\n\n"

View file

@ -357,6 +357,7 @@ possibly_non_vc_files="
MANIFEST aclocal.m4 configure
admin/charsets/jisx2131-filter
src/config.in
leim/small-ja-dic-option
"$(
find admin doc etc lisp \
\( -name '*.el' -o -name '*.elc' -o -name '*.map' -o -name '*.stamp' \