From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66125: 29.1; configure --with-small-ja-dic has no effect Date: Sat, 23 Sep 2023 10:55:18 +0300 Message-ID: <837coh5no9.fsf@gnu.org> References: <838r90byil.fsf@gnu.org> <834jjobwx1.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37881"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66125@debbugs.gnu.org To: ulm@gentoo.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 23 09:56:08 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qjxUl-0009bJ-0V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Sep 2023 09:56:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjxUW-0001Ip-8s; Sat, 23 Sep 2023 03:55:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjxUU-0001IS-Q4 for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2023 03:55:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjxUU-0006tx-I8 for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2023 03:55:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjxUf-00058i-Jr for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2023 03:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Sep 2023 07:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66125 X-GNU-PR-Package: emacs Original-Received: via spool by 66125-submit@debbugs.gnu.org id=B66125.169545572619696 (code B ref 66125); Sat, 23 Sep 2023 07:56:01 +0000 Original-Received: (at 66125) by debbugs.gnu.org; 23 Sep 2023 07:55:26 +0000 Original-Received: from localhost ([127.0.0.1]:37692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjxU6-00057c-20 for submit@debbugs.gnu.org; Sat, 23 Sep 2023 03:55:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjxU3-00057J-Bg for 66125@debbugs.gnu.org; Sat, 23 Sep 2023 03:55:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjxTm-0006mx-PK; Sat, 23 Sep 2023 03:55:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YR2J45kRyOgoBNBUxiANjn99wBW7ieKGWwStRuFAu/M=; b=DcdbpfsfGVUf 4PIDWkisTksi+vnmziXozFJaR7Uoa6QcaiyXmRFJtU2FsSNubhMn+cnO02G/jPejsnPKHNglglhNF qTO652Ea+U2/qqpmvgeIc1Iy6CCxpfo/oN3U4gprkbY0h1eexQ7niZmu9ESnfvm+Kz4S5josZXKOE DW+Qjg8qVtpRKZ5LDnvOqwOq+OaEQbu5TgqwRW9HAwC6czW0pCEZdJVOLKWkOmuVoyJFhqm+LqsQg DiH5dE5IzEgQh7LPFzKJQBEJUAExoccb/dfXeBaFTn1PjygwpoQYaM6UPcELtvwOuTFDC87AdmbBs g2jTAwHBFe+I+dgz2AOJ3Q==; In-Reply-To: <834jjobwx1.fsf@gnu.org> (message from Eli Zaretskii on Wed, 20 Sep 2023 20:02:19 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271137 Archived-At: > Cc: 66125@debbugs.gnu.org > Date: Wed, 20 Sep 2023 20:02:19 +0300 > From: Eli Zaretskii > > > From: Ulrich Mueller > > Cc: 66125@debbugs.gnu.org > > Date: Wed, 20 Sep 2023 18:58:29 +0200 > > > > >>>>> On Wed, 20 Sep 2023, Eli Zaretskii wrote: > > > > > Please tell more details: > > > > > . how did you build Emacs with this option? please show all the > > > steps, starting from unpacking the tarball > > > > $ tar xf /var/cache/distfiles/emacs-29.1.tar.xz > > $ cd emacs-29.1 > > $ ./configure --with-small-ja-dic > > [...] > > Does Emacs generate a smaller-size Japanese dictionary? yes > > [...] > > $ make > > [...] > > $ ls -l lisp/leim/ja-dic/ > > total 9120 > > -rw-r--r-- 1 ulm users 4798823 Jul 23 10:11 ja-dic.el > > -rw-r--r-- 1 ulm users 4535697 Jul 23 10:11 ja-dic.elc > > > > > . how is SMALL_JA_DIC defined in leim/Makefile when you configure > > > with this option? > > > > $ grep ^SMALL_JA_DIC leim/Makefile > > SMALL_JA_DIC = yes > > > > > . when (on what date) did you try building Emacs with that option? > > > > 2023-09-20, i.e. today. > > OK, thanks. In its current form, this option will only make a > difference if you remove the ja-dic files that came with the tarball, > and then rebuild. We should improve this, although it strikes me that > such an obscure feature, which is also not recommended, perhaps > doesn't deserve the effort... Please try the patch below. If it gives good results, I will install it on the emacs-29 branch. Thanks. diff --git a/leim/Makefile.in b/leim/Makefile.in index 4c6c317..03da0f7 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in @@ -26,6 +26,7 @@ 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,19 @@ ${leimdir}/leim-list.el: ${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)if test -f ${leimdir}/ja-dic/ja-dic.el; then \ + sed -n "/small ja-dic option: $(SMALL_JA_DIC)/p" \ + ${leimdir}/ja-dic/ja-dic.el > $@.$$$$ && \ + ${top_srcdir}/build-aux/move-if-change $@.$$$$ $@; \ + else echo \ + ";; Generated with small ja-dic option: $(SMALL_JA_DIC)" > $@; fi + .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) "$<" diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index 9ce31f1..46848c1 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el @@ -346,6 +346,11 @@ skkdic-convert (erase-buffer) (buffer-disable-undo) (generate-lisp-file-heading ja-dic-filename 'skkdic-convert :code nil) + ;; The following line is tested by leim/Makefile.in to see if + ;; ja-dic.el needs to be regenerated because the SMALL_JA_DIC + ;; option was flipped. + (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"