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.devel Subject: Re: 29.2: (void-function batch-update-autoloads) Date: Mon, 26 Aug 2024 15:47:11 +0300 Message-ID: <86bk1fjvsg.fsf@gnu.org> References: <87ikvpt264.fsf@mat.ucm.es> <86jzg4lu0p.fsf@gnu.org> <871q2csh9l.fsf@mat.ucm.es> <861q2clauk.fsf@gnu.org> <87ed6bpil1.fsf@mat.ucm.es> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20781"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Uwe Brauer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 26 14:49:16 2024 Return-path: Envelope-to: ged-emacs-devel@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 1siZ9o-0005IC-6J for ged-emacs-devel@m.gmane-mx.org; Mon, 26 Aug 2024 14:49:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1siZ8I-0004q0-Q0; Mon, 26 Aug 2024 08:47:43 -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 1siZ7t-0004SK-8y for emacs-devel@gnu.org; Mon, 26 Aug 2024 08:47:21 -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 1siZ7s-0007kw-KM; Mon, 26 Aug 2024 08:47:16 -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=/vb+c84Ko5xAnpG/2eKpkKfa6nh2NF2mFFB9LlbvCmw=; b=aZaFrYRLSr66 g3DKuyyty0M9zvvjatLqW/SUPMkVQWuktx+2YF7/jT6UXC3VURDGYskrbOfnCsdf0Tp1I+m3EwkeP ZpJ2TfcnZtXMquROy5eiXJlLMpwXTw3Hq4Sv0pQZdU37UG0ytAOSAk49AzY07MiqI0OC9dDrnQUcq pSnSak58xuGchYTLCDiALb9geDu5WP2cuLSyNXDAuSMa9KDJIZdJJJT0fgf96N15MjtP3gvXZDvM5 7RiErshGg9YCVzDlVTxsfC9NxpdZKCO4/54131UXZA5WMpjLE8s2WZZ7xMKl8NLH33R2QLKAWqM6B 4oj+e6zmO/ai1fOdvRNhKg==; In-Reply-To: <87ed6bpil1.fsf@mat.ucm.es> (message from Uwe Brauer on Mon, 26 Aug 2024 14:35:54 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323129 Archived-At: > From: Uwe Brauer > Cc: Uwe Brauer , emacs-devel@gnu.org > Date: Mon, 26 Aug 2024 14:35:54 +0200 > > I thought in a Makefile, that, among other things, byte compile lisp files, > one should best set > > EMACSFLAGS=-batch --no-site-file > > or something similar and the generation of autoloads would use > functionalities of emacs core. > > As you can see in our case the generation of autoloads was done with > > --8<---------------cut here---------------start------------->8--- > autoloads: > $(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) --eval '(setq generated-autoload-file "$(abspath $(LOADDEFS))")' -f batch-update-autoloads $(abspath $(LOADDIRS)) > --8<---------------cut here---------------end--------------->8--- > > While in your example a lisp file is needed to be loaded. > > Now the problem is that we want to cater for users with different Emacs > versions 30,29,28, 27 and maybe even 26. > > In the case of lisp file, I know how to deal with such a situation, but > for a Makefile? Shall we add a .configure file now to find out which > emacs version is used and then distinguish in the Makefile whether it is > <29 or >=29? It's not rocket science. One idea is to add a Lisp file that would invoke either the old batch-update-autoloads or the new loaddefs-generate--emacs-batch (after loading loaddefs-gen), depending on the value of emacs-version.