Re: Advice on the project structure for a library

2008-06-03 Thread Ralf Corsepius
On Tue, 2008-06-03 at 15:29 +0200, Jef Driesen wrote: > Ralf Wildenhues wrote: > > * Jef Driesen wrote on Tue, Jun 03, 2008 at 12:31:29PM CEST: > CFLAGS=-I${includedir} > #include > > or > > CFLAGS=-I${includedir}/libfoo > #include > > [...] > >>> It's purely a

Re: Advice on the project structure for a library

2008-06-03 Thread Warren Young
Jef Driesen wrote: If your headers use the libfoo/header.h style, your users must, too. That's not consistent with your wish above. Why is that necessary? Isn't the toplevel directory (where the libfoo/header.h is located) also included, even if the user is using a include style? Or is that

Re: Advice on the project structure for a library

2008-06-03 Thread Bob Friesenhahn
On Tue, 3 Jun 2008, Warren Young wrote: Suppose that in one of my public headers, I include one of the other header files, with style. If your headers use the libfoo/header.h style, your users must, too. That's not consistent with your wish above. To allow your users choice in the matter

Re: Advice on the project structure for a library

2008-06-03 Thread Jef Driesen
Warren Young wrote: Jef Driesen wrote: I don't really want to mandate a specific style to the users of my library. [snip] Suppose that in one of my public headers, I include one of the other header files, with style. If your headers use the libfoo/header.h style, your users must, too.

Re: Advice on the project structure for a library

2008-06-03 Thread Jef Driesen
Ralf Wildenhues wrote: * Jef Driesen wrote on Tue, Jun 03, 2008 at 12:31:29PM CEST: CFLAGS=-I${includedir} #include or CFLAGS=-I${includedir}/libfoo #include [...] It's purely a matter of preference. You're right to segregate the headers, but a project shouldn't mandate one #include/-I s

Re: Advice on the project structure for a library

2008-06-03 Thread Warren Young
Jef Driesen wrote: I don't really want to mandate a specific style to the users of my library. [snip] Suppose that in one of my public headers, I include one of the other header files, with style. If your headers use the libfoo/header.h style, your users must, too. That's not consistent

Re: Advice on the project structure for a library

2008-06-03 Thread Ralf Wildenhues
* Jef Driesen wrote on Tue, Jun 03, 2008 at 12:31:29PM CEST: >>> CFLAGS=-I${includedir} >>> #include >>> >>> or >>> >>> CFLAGS=-I${includedir}/libfoo >>> #include [...] >> It's purely a matter of preference. You're right to segregate the >> headers, but a project shouldn't mandate one #include

Re: Advice on the project structure for a library

2008-06-03 Thread Jef Driesen
Warren Young wrote: Jef Driesen wrote: I noticed it is common practice to install the public headers to $includedir/libfoo I don't think I've ever seen a 'lib' prefix on a header file directory. $includedir/foo is far more common. It's also common for 'foo' to be a diminutive, lowercased

Re: Advice on the project structure for a library

2008-06-03 Thread Warren Young
Jef Driesen wrote: I noticed it is common practice to install the public headers to $includedir/libfoo I don't think I've ever seen a 'lib' prefix on a header file directory. $includedir/foo is far more common. It's also common for 'foo' to be a diminutive, lowercased version of the proj

Advice on the project structure for a library

2008-06-03 Thread Jef Driesen
I'm creating my first autoconf/automake project and need some advice on the standard way to structure my project source code (if there is such a thing). My project consist of a (libtool) library and a few example applications that are using the library. Right now my directory structure is as foll