From: David Woodhouse Date: Sun, 18 Jun 2006 10:58:39 +0000 (+0100) Subject: Basic implementation of 'make headers_install' X-Git-Tag: v2.6.18-rc1~12^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d730cfb50cc77da6d00f941daef440918a1922f;p=pandora-kernel.git Basic implementation of 'make headers_install' This adds a make target which exports a subset of headers which contain definitions which are useful for system libraries and tools. It uses the BSD 'unifdef' tool to remove instances of #ifdef __KERNEL__, and uses sed to remove markers like __user. Based on an original implementation by Arnd Bergmann Hacked about by David Woodhouse Reviewed and cleaned up by Sam Ravnborg Signed-off-by: David Woodhouse --- diff --git a/Makefile b/Makefile index 3494c17c9fb9..98e5af72983f 100644 --- a/Makefile +++ b/Makefile @@ -855,6 +855,17 @@ PHONY += depend dep depend dep: @echo '*** Warning: make $@ is unnecessary now.' +# --------------------------------------------------------------------------- +# Kernel headers +INSTALL_HDR_PATH=$(MODLIB)/abi +export INSTALL_HDR_PATH + +PHONY += headers_install +headers_install: include/linux/version.h + $(Q)unifdef -Ux /dev/null + $(Q)rm -rf $(INSTALL_HDR_PATH)/include + $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include + # --------------------------------------------------------------------------- # Modules @@ -1027,6 +1038,8 @@ help: @echo ' cscope - Generate cscope index' @echo ' kernelrelease - Output the release version string' @echo ' kernelversion - Output the version stored in Makefile' + @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH' + @echo ' (default: /lib/modules/$$VERSION/abi)' @echo '' @echo 'Static analysers' @echo ' checkstack - Generate a list of stack hogs' Reading git-diff-tree failed