kbuild: modpost on vmlinux regardless of CONFIG_MODULES
[pandora-kernel.git] / Makefile
index 33559b5..22451c2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 18
-EXTRAVERSION = -rc5
-NAME=Crazed Snow-Weasel
+EXTRAVERSION =
+NAME=Avast! A bilge rat!
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
@@ -736,6 +736,7 @@ endif # ifdef CONFIG_KALLSYMS
 # vmlinux image - including updated kernel symbols
 vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
        $(call if_changed_rule,vmlinux__)
+       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
        $(Q)rm -f .old_version
 
 # The actual objects are generated when descending, 
@@ -889,12 +890,12 @@ depend dep:
 
 # ---------------------------------------------------------------------------
 # Kernel headers
-INSTALL_HDR_PATH=$(MODLIB)/abi
+INSTALL_HDR_PATH=$(objtree)/usr
 export INSTALL_HDR_PATH
 
 PHONY += headers_install
-headers_install: include/linux/version.h
-       $(Q)unifdef -Ux /dev/null
+headers_install: include/linux/version.h scripts_basic FORCE
+       $(Q)$(MAKE) $(build)=scripts scripts/unifdef
        $(Q)rm -rf $(INSTALL_HDR_PATH)/include
        $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include
 
@@ -986,7 +987,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,11 +1078,12 @@ 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'
        @echo  '  namespacecheck  - Name space analysis on compiled kernel'
+       @echo  '  headers_check   - Sanity check on exported headers'
        @echo  ''
        @echo  'Kernel packaging:'
        @$(MAKE) $(build)=$(package-dir) help