[PATCH] headers_check: use a different default directory

`make headers_check' wants to go and write stuff in /lib/modules, which
requires root, whic is unfortunate.

In fact, there's no _particular_ reason for headers_install to put it there
either -- it can go into a subdirectory of the build tree in both cases.
It's not intended to go directly into /usr/include, which is why we didn't
put it there -- and we certainly don't want people screwing around with
symlinking to it.  It's for distributors to take away and do stuff with, so
leaving it in $(objtree) is fine, even in the headers_install case.

I picked $(objtree)/usr/include but I have no _particular_ preference
for that; it just seemed reasonable.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
David Woodhouse 2006-09-16 12:15:55 -07:00 committed by Linus Torvalds
parent ae81f9e379
commit 1ab7a1f3b4

View File

@ -889,7 +889,7 @@ depend dep:
# ---------------------------------------------------------------------------
# Kernel headers
INSTALL_HDR_PATH=$(MODLIB)/abi
INSTALL_HDR_PATH=$(objtree)/usr
export INSTALL_HDR_PATH
PHONY += headers_install
@ -986,7 +986,7 @@ CLEAN_FILES += vmlinux System.map \
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include2
MRPROPER_DIRS += include/config include2 usr/include
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/linux/autoconf.h include/linux/version.h \
include/linux/utsrelease.h \
@ -1077,7 +1077,7 @@ help:
@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 ' (default: $(INSTALL_HDR_PATH))'
@echo ''
@echo 'Static analysers'
@echo ' checkstack - Generate a list of stack hogs'