Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: RFA: fix in features/Makefile
Date: Sun, 24 Aug 2008 18:12:00 -0000	[thread overview]
Message-ID: <m3prnycmh4.fsf@fleche.redhat.com> (raw)

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  <tromey@redhat.com>

	* 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:


             reply	other threads:[~2008-08-24 18:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-24 18:12 Tom Tromey [this message]
2008-08-24 22:38 ` Daniel Jacobowitz
2008-08-25  0:03   ` Tom Tromey
2008-08-25  2:36     ` Daniel Jacobowitz
2008-08-25  4:04       ` Tom Tromey
2008-08-25 12:12         ` Daniel Jacobowitz
2008-10-06 20:39           ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3prnycmh4.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox