From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3056 invoked by alias); 24 Aug 2008 18:12:36 -0000 Received: (qmail 3047 invoked by uid 22791); 24 Aug 2008 18:12:35 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 24 Aug 2008 18:12:01 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m7OIBO6A015869 for ; Sun, 24 Aug 2008 14:11:44 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m7OIBDcq009483 for ; Sun, 24 Aug 2008 14:11:13 -0400 Received: from opsy.redhat.com (vpn-10-23.bos.redhat.com [10.16.10.23]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m7OIB7rT002840; Sun, 24 Aug 2008 14:11:07 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 448123784B2; Sun, 24 Aug 2008 12:11:03 -0600 (MDT) To: gdb-patches@sourceware.org Subject: RFA: fix in features/Makefile From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Sun, 24 Aug 2008 18:12:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-08/txt/msg00599.txt.bz2 When regenerating some files in features using features/Makefile, I saw some strange control characters show up at the start of the generated files. This patch changes features/Makefile to use gdb's logging feature rather than redirection to create the output files. This fixed the problem I saw. This patch also makes it so that the .c files are always rebuilt in response to a 'make'. Without the FORCE code, make was not running the rule for me. Ok? Also, it would be nice if someone documented which .xml->.c translations are to be checked in. I ran the rule with XMLTOC set to all the .xml files under features, and I got a bunch of new files that aren't in the repository. IMO the canonical list ought to be set in features/Makefile somewhere. Tom :ADDPATCH maintenance: ChangeLog: 2008-08-24 Tom Tromey * features/Makefile (%.c): Depend on FORCE. Use logging, not redirection, to create the output file. (FORCE): New target. (.PHONY): Likewise. Index: features/Makefile =================================================================== RCS file: /cvs/src/src/gdb/features/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- features/Makefile 15 Aug 2008 15:18:33 -0000 1.9 +++ features/Makefile 24 Aug 2008 18:07:59 -0000 @@ -70,10 +70,19 @@ sh ../../move-if-change $(outdir)/$*.tmp $(outdir)/$*.dat cfiles: $(CFILES) -%.c: %.xml +%.c: %.xml FORCE $(GDB) -nx -q -batch \ - -ex "set tdesc filename $<" -ex 'maint print c-tdesc' > $@.tmp + -ex 'set logging overwrite on' \ + -ex "set logging file $@.tmp" \ + -ex 'set logging redirect on' \ + -ex "set tdesc filename $<" \ + -ex 'set logging on' \ + -ex 'maint print c-tdesc' \ + -ex 'set logging off' sh ../../move-if-change $@.tmp $@ # Other dependencies. $(outdir)/arm-with-iwmmxt.dat: arm-core.xml xscale-iwmmxt.xml + +.PHONY: cfiles +FORCE: