From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Compilation order. Help with makefiles, please! Date: Sun, 26 Aug 2007 09:38:08 +0000 Message-ID: <20070826093808.GA3996@muc.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1188120954 18973 80.91.229.12 (26 Aug 2007 09:35:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Aug 2007 09:35:54 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 26 11:35:52 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IPEX9-0007EW-CS for ged-emacs-devel@m.gmane.org; Sun, 26 Aug 2007 11:35:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPEX8-0001hr-Tc for ged-emacs-devel@m.gmane.org; Sun, 26 Aug 2007 05:35:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPEX2-0001f2-5s for emacs-devel@gnu.org; Sun, 26 Aug 2007 05:35:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPEX0-0001dv-96 for emacs-devel@gnu.org; Sun, 26 Aug 2007 05:35:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPEWz-0001dA-J6 for emacs-devel@gnu.org; Sun, 26 Aug 2007 05:35:42 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IPEWy-0001Vh-4U for emacs-devel@gnu.org; Sun, 26 Aug 2007 05:35:40 -0400 Original-Received: (qmail 46135 invoked by uid 3782); 26 Aug 2007 09:35:35 -0000 Original-Received: from acm.muc.de (p57B1EB99.dip.t-dialin.net [87.177.235.153]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sun, 26 Aug 2007 11:35:31 +0200 Original-Received: (qmail 4444 invoked by uid 1000); 26 Aug 2007 09:38:08 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-Detected-Kernel: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:77197 Archived-At: Hi, Richard! On Sat, Aug 18, 2007 at 08:44:52PM -0400, Richard Stallman wrote: > Can you do something to make recompilation of the cc files reliable? > We see problems due to recompilation order over and over. I didn't realise it was that bad. But it is a massive pain in the posterior. I have been attempting to minimise this problem by giving specific recipes for order of compilation when, for example, cc-langs.el is changed. Clearly more is wanted. > For instance, if you put the macros etc. into one file whose name > comes alphabetically before the rest, maybe everything will work > reliably. Surely the right tool for this job is the (or a?) makefile? If we're going to fix the problem, we might as well fix it properly. I am attempting to modify ..../lisp/Makefile. However, I'm still learning about makefiles, and would welcome tips or general help, or comments about this approach from people here. At the moment, this is what I've added to ..../lisp/Makefile: ######################################################################### #### NEW STOUGH, 2007-08-25 pr=$(lisp)/progmodes .PHONY: CC-MODE CC-MODE: $(pr)/cc-align.elc $(pr)/cc-awk.elc $(pr)/cc-bytecomp.elc $(pr)/cc-cmds.elc $(pr)/cc-compat.elc $(pr)/cc-defs.elc \ $(pr)/cc-engine.elc $(pr)/cc-fonts.elc $(pr)/cc-langs.elc $(pr)/cc-menus.elc $(pr)/cc-mode.elc $(pr)/cc-styles.elc $(pr)\/cc-subword.elc $(pr)/cc-vars.elc # "Top level" CC Mode files: $(pr)/cc-align.elc \ $(pr)/cc-awk.elc \ $(pr)/cc-cmds.elc \ $(pr)/cc-compat.elc \ $(pr)/cc-menus.elc \ $(pr)/cc-styles.elc \ $(pr)/cc-subword.elc \ $(pr)/cc-vars.elc: \ $(pr)/cc-defs.elc $(pr)/cc-bytecomp.elc # CC Mode files which create, initialise, or use the innard of "language # variables": $(pr)/cc-mode.elc $(pr)/cc-engine.elc $(pr)/cc-fonts.elc: $(pr)/cc-langs.elc # <=========================== # CC Mode file which creates language variables: $(pr)/cc-langs.elc: \ $(pr)/cc-defs.elc $(pr)/cc-bytecomp.elc # CC Mode main macro definition file: $(pr)/cc-defs.elc: $(pr)/cc-bytecomp.elc #### END OF NEW STOUGH, 2007-08-25 ######################################################################### If I delete cc-langs.elc, then do: % make -nf CC-Makefile.mk progmodes/cc-engine.elc , make reports: make: `progmodes/cc-engine.elc' is up to date. , though I would expect it first to rebuild cc-langs.elc (due to the line I've marked with <=====). Thanks in advance for any help! -- Alan Mackenzie (Ittersbach, Germany).