diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-06-18 06:58:39 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-06-18 06:58:39 -0400 |
commit | 8d730cfb50cc77da6d00f941daef440918a1922f (patch) | |
tree | 9679a9ba79e3c496058d351417a058432c42257d /Makefile | |
parent | 9348f0de2d2b541b4ba64fb1f4efee9710a3d731 (diff) |
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-- | Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -856,6 +856,17 @@ depend dep: | |||
856 | @echo '*** Warning: make $@ is unnecessary now.' | 856 | @echo '*** Warning: make $@ is unnecessary now.' |
857 | 857 | ||
858 | # --------------------------------------------------------------------------- | 858 | # --------------------------------------------------------------------------- |
859 | # Kernel headers | ||
860 | INSTALL_HDR_PATH=$(MODLIB)/abi | ||
861 | export INSTALL_HDR_PATH | ||
862 | |||
863 | PHONY += headers_install | ||
864 | headers_install: include/linux/version.h | ||
865 | $(Q)unifdef -Ux /dev/null | ||
866 | $(Q)rm -rf $(INSTALL_HDR_PATH)/include | ||
867 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include | ||
868 | |||
869 | # --------------------------------------------------------------------------- | ||
859 | # Modules | 870 | # Modules |
860 | 871 | ||
861 | ifdef CONFIG_MODULES | 872 | ifdef CONFIG_MODULES |
@@ -1027,6 +1038,8 @@ help: | |||
1027 | @echo ' cscope - Generate cscope index' | 1038 | @echo ' cscope - Generate cscope index' |
1028 | @echo ' kernelrelease - Output the release version string' | 1039 | @echo ' kernelrelease - Output the release version string' |
1029 | @echo ' kernelversion - Output the version stored in Makefile' | 1040 | @echo ' kernelversion - Output the version stored in Makefile' |
1041 | @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH' | ||
1042 | @echo ' (default: /lib/modules/$$VERSION/abi)' | ||
1030 | @echo '' | 1043 | @echo '' |
1031 | @echo 'Static analysers' | 1044 | @echo 'Static analysers' |
1032 | @echo ' checkstack - Generate a list of stack hogs' | 1045 | @echo ' checkstack - Generate a list of stack hogs' |