summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-06-18 11:58:39 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-06-18 11:58:39 +0100
commit8d730cfb50cc77da6d00f941daef440918a1922f (patch)
tree9679a9ba79e3c496058d351417a058432c42257d /Makefile
parent9348f0de2d2b541b4ba64fb1f4efee9710a3d731 (diff)
downloadkernel-crypto-8d730cfb50cc77da6d00f941daef440918a1922f.tar.gz
kernel-crypto-8d730cfb50cc77da6d00f941daef440918a1922f.tar.xz
kernel-crypto-8d730cfb50cc77da6d00f941daef440918a1922f.zip
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 <arnd@arndb.de> Hacked about by David Woodhouse <dwmw2@infradead.org> Reviewed and cleaned up by Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3494c17c9fb..98e5af72983 100644
--- a/Makefile
+++ b/Makefile
@@ -856,6 +856,17 @@ 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
ifdef CONFIG_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'