[OPEN-ILS-DEV] C code directory layout changes, automake, etc.

Bill Erickson billserickson at gmail.com
Mon Apr 30 10:07:25 EDT 2007


On 4/30/07, David J. Fiander <djfiander at fastmail.fm> wrote:
>
> Bill Erickson wrote:
> > An additional idea is to create a top-level "include" directory
> > (OpenSRF/include) for libopensrf header files that need to be available
> > to standalone components (router, C apps, etc.) at compile time.  With
> > this, we will hopefully remove the necessity for a temporary build
> > directory.
> >
> > So:
> >
> > OpenSRF/src/utils
> >               /src/libtransport
> >               /src/libstack
> >
> > To:
> >
> > OpenSRF/include
> >               /src/libopensrf
>
> This looks good, and sounds like it will make things simpler moving
> forward.  One minor nit though: it's traditional for the include directory
> for a package to have the name of the package, so you'd end up with
> something like:
>
>         /src/libopensrf
>         /include/OpenSRF
>
> And then you would have a '-I/include' flag for the compile, and the
> source
> would all refer to
>
>         #include <OpenSRF/foo.h>
>
> which tends to make it easier for the person reading the code, especially
> those who are less familiar with the layout.


Ahh.  Actaully, that is the plan.  Sorry for not mentioning that.
Currently, we install the headers into <PREFIX>/include/opensrf/.  Any
standalone code then includes the opensrf headers with

#include <opensrf/blah.h>

During this process, we will need to make sure the core libs also include
<opensrf/blah.h> and not just "blah.h" (which they are doing now) for
consistency.   And we'll need to create the OpenSRF/include/opensrf/
directory for the actual headers.


Thanks for pointing that out, David.

-bill


-- 
Bill Erickson
PINES Systems Developer
Georgia Public Library Service
billserickson at gmail.com
http://open-ils.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20070430/85c2ded8/attachment.html


More information about the Open-ils-dev mailing list