Re: Kcomedilib headers

On Thu, 4 Dec 2003, David Schleef wrote:

> On Thu, Dec 04, 2003 at 05:51:12PM -0500, Calin A. Culianu wrote:
> > On Thu, 4 Dec 2003, David Schleef wrote:
> > > You should put it in a documentation/examples directory.  It is not
> > > supposed to be installed like a normal header, since Linux doesn't
> > > have the concept of installing headers to build kernel modules.
> >
> > That makes me sad.  We should invent our own place for it then! :)
>
> I recommend either /usr/i386-kernel-linux/include or
> /usr/lib/linux-modules-2.4.23/include/.  The former treats building code
> to be inserted as a module as an "architecture" (it is, roughly).  The
> latter addresses the difficulty that Linux has with keeping a stable
> module ABI.

Hmmm.  I have a problem with the latter: The comedi headers themselves
aren't really (necessarily) kernel-version dependent at all (they may have
preprocessing directives in them that are sensitive to kernel version, but
that in itself comes from the current build context -- ie the build
variables and config.h, etc).

I would argue that artificially binding a particular (kernel-side) comedi
header to a particular kernel version by putting it in a directory
sensitive to kernel version is not capturing the reality of the
relationship between kernel-comedilib and the kernel..

Basically, there is one copy of linux/comedi.h for _all_ kernel versions,
so why pretend like there should be multiple copies of it for each kernel
version?

Also, the first directory path listed above has problems for me too.
Comedi.h is not really sensitive to architecture.  There is one copy of
comedi.h for all architectures, AFAIK.

I think a simpler thing like: /usr/include/comedi or
/usr/include/comedi/linux for the kernel side would suffice, but that's
just me and I may be naive...

Of course, if we wanted to save build information about how comedi was
built, we may put that in one of the arch-dependent or kernel-version
dependent directories...

What do you think?  Am I missing something?  If I am and if you have the
time, your comments are appreciated.

-Calin

Received on 2003-12-06Z17:15:57