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: Patch for fields of `struct buffer' Date: Tue, 01 Feb 2011 16:44:34 -0800 Organization: UCLA Computer Science Department Message-ID: <4D48A8F2.2080607@cs.ucla.edu> References: 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 1296607489 5703 80.91.229.12 (2 Feb 2011 00:44:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Feb 2011 00:44:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 02 01:44:45 2011 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.69) (envelope-from ) id 1PkQpw-0005yp-42 for ged-emacs-devel@m.gmane.org; Wed, 02 Feb 2011 01:44:44 +0100 Original-Received: from localhost ([127.0.0.1]:47308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkQpv-0006x8-9e for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2011 19:44:43 -0500 Original-Received: from [140.186.70.92] (port=56444 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkQpq-0006we-RY for emacs-devel@gnu.org; Tue, 01 Feb 2011 19:44:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkQpp-00017G-JR for emacs-devel@gnu.org; Tue, 01 Feb 2011 19:44:38 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:56850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkQpp-000172-EF for emacs-devel@gnu.org; Tue, 01 Feb 2011 19:44:37 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 1F13639E80E1; Tue, 1 Feb 2011 16:44:36 -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 MHBv9lpk9Trs; Tue, 1 Feb 2011 16:44:35 -0800 (PST) Original-Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6CBFE39E8083; Tue, 1 Feb 2011 16:44:35 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 In-Reply-To: X-Enigmail-Version: 1.1.2 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.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:135439 Archived-At: On 02/01/11 13:59, Tom Tromey wrote: > +gl-stamp: $(ALL_SOURCES) > + @rm -f gl-tmp > + echo "/* This file was auto-generated */" > gl-tmp > + echo "/* DO NOT EDIT */" >> gl-tmp > + echo "struct emacs_globals {" >> gl-tmp > + ... It'd be better to package that shell-script code into a shell script named (say) globals.sh. Then the make rule could be much simpler: $(srcdir)/gl-stamp: $(ALL_SOURCES) $(srcdir)/globals.sh rm -f gl-stamp.tmp $(srcdir)/globals.sh $(ALL_SOURCES) >gl-stamp.tmp $(srcdir)/../move-if-change gl-stamp.tmp $@ and there would be no need for the files globals-1.sed and globals-2.sed, as their contents could be put into strings in gl-stamp.sh. The rule for "make clean" should also remove *.tmp, to clean any leftover temporaries. > +ALL_SOURCES = alloc.c atimer.c bidi.c buffer.c bytecode.c callint.c \ These files all need $(srcdir)/ prepended to their names.