From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31021 invoked by alias); 5 Oct 2007 17:52:45 -0000 Received: (qmail 31012 invoked by uid 22791); 5 Oct 2007 17:52:44 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 Oct 2007 17:52:42 +0000 Received: (qmail 15272 invoked from network); 5 Oct 2007 17:52:40 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 Oct 2007 17:52:40 -0000 To: gdb-patches@sourceware.org Subject: Re: [rfc] Pre-parse XML target descriptions References: <20071005153350.GA23583@caradoc.them.org> <20071005174009.GA3182@caradoc.them.org> From: Jim Blandy Date: Fri, 05 Oct 2007 17:52:00 -0000 In-Reply-To: <20071005174009.GA3182@caradoc.them.org> (Daniel Jacobowitz's message of "Fri, 5 Oct 2007 13:40:09 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00062.txt.bz2 Daniel Jacobowitz writes: > On Fri, Oct 05, 2007 at 09:54:21AM -0700, Jim Blandy wrote: >> Actually, the mechanism I suggested could be incorporated in any >> case. The GDB build process should always check the checksums of the >> XML input files against those stored in the files built from them, >> simply to remind developers when they need to regenerate the C files. >> It's just a good general principle for dealing with pre-generated >> files. > > But honestly, is it worth the trouble? If we do that we have to > content with at least these issues: > > - $build != $host; can not run GDB at all > - Expat not available; can not parse descriptions > - GDB needs the descriptions to build but can't regenerate them > until after it is built. > > I don't think it's important enough to make the build system > more complicated. I think you're imagining something more complicated than I had in mind. This is all I meant: gdb: check-xml-regs check-xml-regs: foo.check-xml-regs-stamp bar.check-xml-regs-stamp %.check-xml-regs-stamp: %.xml %.c stamp=$$(sed -ne 's|/. stamp: \(.*\) ./|\1|p' < $*.c); \ if [ "$$(md5sum $*.xml)" = "$$stamp" ]; then \ touch $@; \ else \ echo '.c file must be regenerated from .xml: $*.c' >&2; \ exit 1; \ fi