From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.devel Subject: Re: Trunk: Build error on FreeBSD Date: Mon, 17 Sep 2012 15:04:39 +0200 Message-ID: <85vcfc94to.fsf@iznogoud.viz> References: <86ipbfptdr.wl%hskuhra@eumx.net> <50544B5F.6060806@cs.ucla.edu> <85ehm3e9df.fsf@iznogoud.viz> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347887214 13000 80.91.229.3 (17 Sep 2012 13:06:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2012 13:06:54 +0000 (UTC) Cc: "Herbert J. Skuhra" , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 17 15:06:56 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TDb2K-0003sT-CN for ged-emacs-devel@m.gmane.org; Mon, 17 Sep 2012 15:06:52 +0200 Original-Received: from localhost ([::1]:35508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDb2F-0006Yg-Ls for ged-emacs-devel@m.gmane.org; Mon, 17 Sep 2012 09:06:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDb28-0006YS-8q for emacs-devel@gnu.org; Mon, 17 Sep 2012 09:06:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDb22-00078I-2l for emacs-devel@gnu.org; Mon, 17 Sep 2012 09:06:40 -0400 Original-Received: from mx08.lb01.inode.at ([62.99.145.8]:36775 helo=mx.inode.at) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDb21-00076a-Of for emacs-devel@gnu.org; Mon, 17 Sep 2012 09:06:33 -0400 Original-Received: from [91.119.101.188] (port=16144 helo=iznogoud.viz) by smartmx-08.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TDb1y-0001gN-FJ; Mon, 17 Sep 2012 15:06:31 +0200 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TDb1v-0003Hj-KB; Mon, 17 Sep 2012 15:06:27 +0200 Mail-Followup-To: Paul Eggert , "Herbert J. Skuhra" , emacs-devel@gnu.org User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 62.99.145.8 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:153356 Archived-At: On Sat, Sep 15 2012, Wolfgang Jenkner wrote: > On Sat, Sep 15 2012, Paul Eggert wrote: > >> On Fedora 17, 'gmake bootstrap' does delete src/epaths.h >> as part of the 'bootstrap-clean' action, but it goes on >> to recreate it as part of './config.status --recheck' > > For autoconf 2.69 (info "(autoconf)config.status Invocation") states > > `--recheck' > Ask `config.status' to update itself and exit (no instantiation). > > and (info "(autoconf)Configuration Actions") says that > AC_CONFIG_COMMANDS is an "instantiating macro". A patch is at the end, after this rather amusing story: So, src/epaths.h is created by something else. Let's begin with the beginning: bootstrap does the following bootstrap: bootstrap-clean FRC cd $(srcdir) && { ./autogen.sh || test $$? -eq 101; } $(MAKE_CONFIG_STATUS) $(MAKE) $(MFLAGS) info all When autogen.sh finishes, src/epaths.h has been nuked but config.status is still there and executable. The definition of MAKE_CONFIG_STATUS shows that the next step is ./config.status --recheck; which doesn't recreate src/epaths.h, see above (the --recheck flag was added in rev. 109962). At this point, however, the last step has created a new config.status, which is now newer than Makefile. Makefile contains a rule to update itself, which has indeed config.status as prerequisite: MAKEFILE_NAME = Makefile $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) ./config.status Now for GNU make, this is exactly, what happens next, i.e., config.status runs and finally recreates src/epaths.h. I think this rule is triggered before anything else because of (info "(make)Remaking Makefiles"): To this end, after reading in all makefiles, `make' will consider each as a goal target and attempt to update it. For other versions of make the rule is triggered for the lib target. Wolfgang Ah, the patch: === modified file 'Makefile.in' --- Makefile.in 2012-09-16 18:49:00 +0000 +++ Makefile.in 2012-09-17 12:51:18 +0000 @@ -358,7 +358,7 @@ MAKEFILE_NAME = Makefile $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) - ./config.status + MAKE='${MAKE}' ./config.status # Don't erase these files if make is interrupted while refreshing them. .PRECIOUS: Makefile config.status