From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: esr@thyrsus.com (Eric S. Raymond) Newsgroups: gmane.emacs.devel Subject: VCSWITNESS = fail ** 2 Date: Sun, 12 Jan 2014 09:37:33 -0500 (EST) Message-ID: <20140112143733.B3F863811D4@snark.thyrsus.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1389537492 28239 80.91.229.3 (12 Jan 2014 14:38:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2014 14:38:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 12 15:38:20 2014 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 1W2MB5-0000t3-Vr for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 15:38:16 +0100 Original-Received: from localhost ([::1]:38122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2MB5-0001cN-GQ for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 09:38:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2MAz-0001cF-3b for emacs-devel@gnu.org; Sun, 12 Jan 2014 09:38:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2MAu-0005on-EG for emacs-devel@gnu.org; Sun, 12 Jan 2014 09:38:09 -0500 Original-Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5]:58440 helo=snark.thyrsus.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2MAu-0005oj-9N for emacs-devel@gnu.org; Sun, 12 Jan 2014 09:38:04 -0500 Original-Received: by snark.thyrsus.com (Postfix, from userid 1000) id B3F863811D4; Sun, 12 Jan 2014 09:37:33 -0500 (EST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 71.162.243.5 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:168184 Archived-At: Nobody has stepped up to own or defend this code in Makefile.in: src: Makefile FRC dirstate='.bzr/checkout/dirstate'; \ vcswitness='$$(srcdir)/../'$$dirstate; \ [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \ cd $@ || exit; \ boot=bootstrap-emacs$(EXEEXT); \ [ ! -x "$$boot" ] || boot=''; \ $(MAKE) all $(MFLAGS) \ CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot" \ VCSWITNESS="$$vcswitness" Which is just as well, because the second through fourth lines dirstate='.bzr/checkout/dirstate'; \ vcswitness='$$(srcdir)/../'$$dirstate; \ [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \ are a case study in how not to do things. First, they're broken. The readability test on line 4 is not checking the same file path that is set on line 3. The contingent result with the current repo tree structure is that vcswitness is never set. The necessary result under almost any possible tree structure is that vcswitness would not be set correctly. Now let's look at what VCSWITNESS is used for. The key lines are in src/Makefile.in: ## VCSWITNESS points to the file that holds info about the current checkout. ## We use it as a heuristic to decide when to rebuild loaddefs.el. ## If empty it is ignored; the parent makefile can set it to some other value. VCSWITNESS = $(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS="$(bootstrap_exe)" This test is wrong. The correct prerequisites would be every elisp file that declares an autoload cookie. According to find . -name '*.el' | xargs grep '#autoload' -l | wc -l there are presently 786 such files. The right thing would be for configure to generate that list into a makefile variable referenced where VCSWITNESS is now. I could find out who was responsible for this. I think I'd prefer not to know, and to hope the person was basically competent but having a bad day. I'm going to delete the broken code. That will leave us no worse off, and eliminate a Bazaar dependency. If I weren't eyeball-deep in preparations for the git transition I'd actually fix this. But having gone unnoticed for a long time suggests it's not very important. I'll add an entry to BUGS or PROBLEMS. -- Eric S. Raymond The difference between death and taxes is death doesn't get worse every time Congress meets -- Will Rogers