On Thu, 2009-12-03 at 01:50 -0800, Zach Welch wrote:
> On Tue, 2009-12-01 at 21:08 -0800, Zach Welch wrote:
> > Hi all,
> > 
> > Assuming a split between policy and mechanism can be addressed, OpenOCD
> > will become much more usable as a proper library.  One of the questions
> > that needs resolution is "how to install our header files".  The answer
> > that we chose for this will determine how much restructuring will be
> > required to make it happen.
> > 
> > The easiest option to simply mirror the public headers in our existing
> > src/ hierarchy into /usr/include/openocd[-<version>]/, such that
> > applications can use -I<that_path> and #include <<module>/<header>.h>.
> > Indeed, I have a series of patches that accomplishes these changes for
> > all <module>s and <header>s in the tree.  (Via a script, so it's easy to
> > recreate its patches when I get merge conflicts.)
> 
> As I mentioned in another thread, I am going to finish this series and
> push it shortly.  Speak now if you object.

Pushed, after improving the script to exclude changing C files in the
same directory.  All #includes in .h files got converted, but this
change eliminated almost half of the patches -- most of which were
purely internals.  This retain normal conventions: use quotes when it's
a truly local file (i.e. in a C file, in the same directory).  The
problem with .h files is that they may be installed, in which case they
should try to use <>.  

The other minor exception must be made for conditionally installed
headers (e.g. "{drivers,minidriver}/minidriver_imp.h").  In this case,
the header will have different paths in the tree and the final
installation location (invariably, due to the Makefile mechanics), and
they must then be installed and used only in the same directory as a
parent header (e.g. "/usr/include/jtag/minidriver{,imp}.h"

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

Reply via email to