]> git.eshelyaron.com Git - emacs.git/commitdiff
Support regeneration of ja-dic.el under '--with-small-ja-dic'
authorEli Zaretskii <eliz@gnu.org>
Sun, 24 Sep 2023 12:30:01 +0000 (15:30 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 24 Sep 2023 12:30:01 +0000 (15:30 +0300)
* 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'.

.gitignore
leim/Makefile.in
lisp/international/ja-dic-cnv.el
make-dist

index b09a0c030b3486a29c5c95a886900147f8d228ee..3cec4cc068559b88802b468a83108e4631d595c1 100644 (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
index 4c6c3179283dee05292e93f14dad98dc9686e39c..f7dfdf66f30e76ec181d99be366df23e9b6a46fc 100644 (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) "$<"
 
index 9ce31f11d91e7cdeb143a88765db7e2dce574f3e..c507aa588074a38f25c754a6febccab8e4fd72e1 100644 (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"
index 80c672dbf3a4a7ac795807b392fd56b4cb86ac94..57881d50f0d7168effb09c11057c8b9a1bacb688 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -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' \