Re: PATCH: Add x86 xml files

Mark Kettenis
2010-02-07T22:43:42Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

> Date: Sun, 7 Feb 2010 13:50:32 -0800
> From: "H.J. Lu" <hjl.tools@gmail.com>
>
> >> +I386-XMLTOC = $(addsuffix .xml, $(filter i386/%, $(WHICH)))
> >> +I386-CFILES = $(patsubst %.xml,%.c,$(I386-XMLTOC))
> >
> > Why are you introducing these variables?
>
> They are used by the new "i386-cfiles" target.
>
> >>  all: $(OUTPUTS)
> >>
> >>  $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
> >> @@ -71,6 +80,8 @@ $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
> >>       sh ../../move-if-change $(outdir)/$*.tmp $(outdir)/$*.dat
> >>
> >>  cfiles: $(CFILES)
> >> +i386-cfiles: $(I386-CFILES)
> >
> > And this target?
>
> You need a working gdb for your target with XML support to generate
> those C files for gdbserver. That is why XMLTOC is empty and GDB
> is false. To generate those C files, you have to do
>
> # make cfiles GDB="your new GDB" XMLTOC="your XML files"
>
> I added this target so that I can do
>
> # make i386-cfiles GDB="my new GDB"
>
> to generate i386 C files for gdbserver without specifying XMLTOC at
> command line. It is very convenience for maintenance.

Well, given that none of the other architectures have such a target, I
think you shouldn't add this only for i386.

If you really think the convenience is important, it has to be added
for the other architectures as well. But that's better done in a
seperarate patch.