From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Speeding up the bootstrap build - a quick hack. Date: Wed, 19 Jan 2022 11:50:43 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35458"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 19 13:29:00 2022 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 1nAA5E-00094I-JT for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Jan 2022 13:29:00 +0100 Original-Received: from localhost ([::1]:59932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAA59-0003JX-0u for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Jan 2022 07:28:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nA9UI-0005GR-1G for emacs-devel@gnu.org; Wed, 19 Jan 2022 06:50:51 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:58184 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1nA9UE-0004Og-3c for emacs-devel@gnu.org; Wed, 19 Jan 2022 06:50:48 -0500 Original-Received: (qmail 9410 invoked by uid 3782); 19 Jan 2022 11:50:44 -0000 Original-Received: from acm.muc.de (p4fe15af9.dip0.t-ipconnect.de [79.225.90.249]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 19 Jan 2022 12:50:43 +0100 Original-Received: (qmail 19493 invoked by uid 1000); 19 Jan 2022 11:50:43 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.devel:284973 Archived-At: Hello, Stefan. On Tue, Jan 18, 2022 at 15:48:23 -0500, Stefan Monnier wrote: > >> >> > -.PHONY: compile-first compile-main compile compile-always > >> >> > +.PHONY: compile-zeroth compile-first compile-main compile compile-always > >> >> > -compile-first: $(COMPILE_FIRST) > >> >> > +compile-zeroth: $(COMPILE_ZEROTH) > >> >> > +compile-first: compile-zeroth $(COMPILE_FIRST) > >> >> Is this necessary, or is it just helpful to debug the Makefile? > >> > I'm not sure. I'm a little confused, still. > > It seems to be necessary. At any rate, changing the mix slightly gave > > rise to unwanted results. In particular... > >> At least I can't see why `compile-first` should need to depend on > >> `compile-zeroth` since the > >> %.elc: %.el $(COMPILE_ZEROTH) > > If I change that line to > > %.elc: %.el compile-zeroth > > , then Emacs builds, but redundantly ELC's all the .el files which are > > preloaded, taking 15 seconds longer to do so. I don't understand why > > this happens. > > Even more notably, if I eliminate compile-zeroth, putting in instead > > $(COMPILE_ZEROTH) everywhere needed, then make creates and deletes the > > ..elc0 files four times, and also redundantly runs ELC on the preloaded > > ..el files, despite them already being .eln's. This run took 2½ minutes > > longer than expected, too. I don't understand why all that happened, > > either. > But what if you don't define `compile-zeroth`, and you keep: > compile-first: $(COMPILE_FIRST) > and > %.elc: %.el $(COMPILE_ZEROTH) > ? I think that is what I have just tried again. The results are as in my paragraph above beginning "Even more notably, ....". I don't understand at all what's happening. Maybe it's something to do with compile-zeroth being declared .PHONY. It also might have to do with make somehow regarding *.elc0 as "intermediate files", and is thus "safe" to delete them (four times deleted in total). > >> rule should already give the same result. So I'd suggest you drop > >> this part of the patch and see if that causes any kind of trouble. > > As above, it caused all sorts of trouble. > Maybe I'm confused but IIUC none of what you tried corresponds to just > not using the above hunk. I think I'm confused. make isn't a simple program. > Stefan -- Alan Mackenzie (Nuremberg, Germany).