[PATCH] 'make headers_install' kbuild target.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached is the current patch from mainline to my working tree at
git://git.infradead.org/~dwmw2/headers-2.6.git -- visible in gitweb at
http://git.infradead.org/?p=users/dwmw2/headers-2.6.git;a=summary

It adds a 'make headers_install' target to the kernel makefiles, which
exports a subset of the headers and runs 'unifdef' on them to clean them
up for installation in /usr/include.

You'll need unifdef, which is available at 
http://www.cs.cmu.edu/~ajw/public/dist/unifdef-1.0.tar.gz and can
probably be put into our scripts/ directory since it's BSD-licensed.

I expect the kbuild folks to reimplement what I've done in the Makefile,
but it works well enough to get us started. The text file listing the
header files will probably want to change -- maybe we'll have a file in
each directory listing the exportable files in that directory, or maybe
we'll put a marker in the public files which we can grep for. I don't
care much.

Implementation details aside, the point is that we can now work on
refining the choice of headers to be exported, and more importantly we
can start fixing the _contents_ of those headers so that nothing which
should be private is exported in them outside #ifdef __KERNEL__.

I've chosen headers in the generic directories and in asm-powerpc; the
other asm directories could do with a proper selection being made; the
rest of the current list is just inherited from Fedora's
glibc-kernheaders package for now.

For a start, the headers I've marked for export are sometimes including
headers which _weren't_ so marked, and hence which don't exist in our
exported set of headers. I've started to move those inclusions into
#ifdef __KERNEL__ where appropriate, but there's more of that to do
before we can even use these for building anything and actually start to
test them in earnest.

Adrian, I'm hoping we can persuade you to help us audit the resulting
contents of usr/include/* and apply your usual treatment to the headers
until it looks sane. That assistance would be very much appreciated.

-- 
dwmw2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux