From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Annoyingly cautious make rules Date: Fri, 02 Dec 2011 22:35:12 -0800 Organization: UCLA Computer Science Department Message-ID: <4ED9C320.8070708@cs.ucla.edu> References: <83ehwnc97k.fsf@gnu.org> <4ED917E2.7020807@cs.ucla.edu> <4ED94331.7030702@cs.ucla.edu> <4ED98EED.5020301@cs.ucla.edu> <4ED99DB7.1040005@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1322894128 26585 80.91.229.12 (3 Dec 2011 06:35:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 3 Dec 2011 06:35:28 +0000 (UTC) Cc: Eli Zaretskii , Andreas Schwab , rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 03 07:35:23 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RWjBy-0001lz-AO for ged-emacs-devel@m.gmane.org; Sat, 03 Dec 2011 07:35:22 +0100 Original-Received: from localhost ([::1]:48106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWjBx-0006II-Km for ged-emacs-devel@m.gmane.org; Sat, 03 Dec 2011 01:35:21 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWjBu-0006IC-Eq for emacs-devel@gnu.org; Sat, 03 Dec 2011 01:35:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWjBt-0007eZ-Hl for emacs-devel@gnu.org; Sat, 03 Dec 2011 01:35:18 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:34150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWjBq-0007dv-Pu; Sat, 03 Dec 2011 01:35:15 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 383EE39E800A; Fri, 2 Dec 2011 22:35:12 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30A0PktZdoHz; Fri, 2 Dec 2011 22:35:11 -0800 (PST) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 8358C39E8006; Fri, 2 Dec 2011 22:35:11 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146454 Archived-At: On 12/02/11 21:48, Stefan Monnier wrote: > After that, "make" should take care of rebuilding configure if/when > needed There's no practical way for "make" to do that, and Emacs's current make rules do not do that. For example, if I manually edit Makefile.in so that the rule for 'configure' looks like this: $(srcdir)/configure: $(AUTOCONF_INPUTS) cd ${srcdir} && autoconf echo '#foo' >>$@ # <-- I added this line. then "make" should rebuild "configure". But "make" does not, as "Makefile.in" is not a dependency for "configure". We could fix this particular problem by adding "Makefile.in" as a dependency for every file that gets built in every directory. But (1) even that would not suffice in general, and (2) that would cause more builds to run unnecessarily and annoyingly slowly. Emacs makefiles, like all practical makefiles, are an engineering compromise between correctness and speed. There's no practical way to get 100% correctness with "make" after an arbitrary maintainer change to source files. Instead, we strive for correctness a high percentage of the time, in such a way that maintainers should have a good idea of all the issues that might cause incorrectness and how to avoid these issues. One possible rule of thumb, for example, is the idea that "make" runs fairly quickly and works unless you have edited the build procedure, and in the latter case you should run "make bootstrap" which is much safer but also much slower. That is an easy guideline to remember, and surely we can get this to work a high percentage of the time. Perhaps you prefer a different guideline, and if so we can try to get that other guideline to work. But the rule cannot be that "make" always works unaided: that's not practical.