On Fri, 2009-12-04 at 22:51 +0100, Øyvind Harboe wrote:
> On Fri, Dec 4, 2009 at 10:36 PM, Zach Welch <z...@superlucidity.net> wrote:
> > On Fri, 2009-12-04 at 16:03 +0100, Øyvind Harboe wrote:
> >> It's getting there, see oharboe/fixminidriver.
> >>
> >> I had to mess with lots of Makefile.am to pollute the include path. If I
> >> can get that out of the way, then I should be able to clean up the
> >> rest too
> >
> > Yeah, those changes should not go into the tree as-is.  They make a
> > total mess of the build system.
> 
> Yeah, I had to put in a kludge in the whole 15 minutes I had between
> routing FPGAs to test the rest :-)
> 
> > In your second patch, the drivers/minidriver_imp.h patch is close, but a
> > little buggy.  You #define and declare the same function; the declared
> > version should be the _imp version.
> 
> I think I can simply do away with the _imp and the #define altogether.
> More straightforward.

Minimal patches.  Whatever that turns out to be..... :)

> > Seeing your new patch gives me a new idea for how to fix things:
> > 1) In jtag/Makefile, use BUILT_SOURCES to copy the proper
> > minidriver_imp.h (and jtag_minidriver.h, if needed) into the jtag
> > directory.
> 
> Sounds good to me. I don't know the autotools speak to do that.
> I'll give it a go.

I would have to stab at it several times myself, I'm sure.
At the core, I would expect the rules to look something like:

BUILT_SOURCES += minidriver_imp.h jtag_minidriver.h

minidriver_imp.h: $(MINIDRIVER_IMP_DIR)/minidriver_imp.h
        cp $< $@

jtag_minidriver.h: $(JTAG_MINIDRIVER_DIR)/jtag_minidriver.h
        cp $< $@

The two _DIR variables get set inside the automake logic.  The values
will be 'drivers' and 'minidriver' for the first, and 'minidummy' and
'zy1000' for the second.   So, you're just copying the two files from
the source directories (rather than -I'ing those directories).
You'll also need to add those files to the CLEANFILES rule.

> > 2) #include <jtag/minidriver_imp.h> and <jtag/jtag_minidriver_h.>
> 
> minidriver_imp.h includes jtag_minidriver.h.

Right, but both should use bracketed paths... not "foo.h"... This should
obviate the rules added by your first patch.

--Z
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to