This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] Pre-parse XML target descriptions


Daniel Jacobowitz <drow at false.org> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]