]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - Documentation/kbuild/makefiles.txt
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[karo-tx-linux.git] / Documentation / kbuild / makefiles.txt
index 9b9c4797fc55653dec668d82ae8c43ccdab58e4b..e18daca65ccd2add180e5e74f97d0cc4743677cb 100644 (file)
@@ -44,11 +44,11 @@ This document describes the Linux kernel Makefiles.
           --- 6.11 Post-link pass
 
        === 7 Kbuild syntax for exported headers
-               --- 7.1 header-y
+               --- 7.1 no-export-headers
                --- 7.2 genhdr-y
-               --- 7.3 destination-y
-               --- 7.4 generic-y
-               --- 7.5 generated-y
+               --- 7.3 generic-y
+               --- 7.4 generated-y
+               --- 7.5 mandatory-y
 
        === 8 Kbuild Variables
        === 9 Makefile language
@@ -1236,7 +1236,7 @@ When kbuild executes, the following steps are followed (roughly):
        that may be shared between individual architectures.
        The recommended approach how to use a generic header file is
        to list the file in the Kbuild file.
-       See "7.4 generic-y" for further info on syntax etc.
+       See "7.3 generic-y" for further info on syntax etc.
 
 --- 6.11 Post-link pass
 
@@ -1263,53 +1263,32 @@ The pre-processing does:
 - drop include of compiler.h
 - drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
 
-Each relevant directory contains a file name "Kbuild" which specifies the
-headers to be exported.
-See subsequent chapter for the syntax of the Kbuild file.
-
-       --- 7.1 header-y
-
-       header-y specifies header files to be exported.
-
-               Example:
-                       #include/linux/Kbuild
-                       header-y += usb/
-                       header-y += aio_abi.h
+All headers under include/uapi/, include/generated/uapi/,
+arch/<arch>/include/uapi/ and arch/<arch>/include/generated/uapi/
+are exported.
 
-       The convention is to list one file per line and
-       preferably in alphabetic order.
+A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
+arch/<arch>/include/asm/ to list asm files coming from asm-generic.
+See subsequent chapter for the syntax of the Kbuild file.
 
-       header-y also specifies which subdirectories to visit.
-       A subdirectory is identified by a trailing '/' which
-       can be seen in the example above for the usb subdirectory.
+       --- 7.1 no-export-headers
 
-       Subdirectories are visited before their parent directories.
+       no-export-headers is essentially used by include/uapi/linux/Kbuild to
+       avoid exporting specific headers (e.g. kvm.h) on architectures that do
+       not support it. It should be avoided as much as possible.
 
        --- 7.2 genhdr-y
 
-       genhdr-y specifies generated files to be exported.
-       Generated files are special as they need to be looked
-       up in another directory when doing 'make O=...' builds.
+       genhdr-y specifies asm files to be generated.
 
                Example:
-                       #include/linux/Kbuild
-                       genhdr-y += version.h
+                       #arch/x86/include/uapi/asm/Kbuild
+                       genhdr-y += unistd_32.h
+                       genhdr-y += unistd_64.h
+                       genhdr-y += unistd_x32.h
 
-       --- 7.3 destination-y
 
-       When an architecture has a set of exported headers that needs to be
-       exported to a different directory destination-y is used.
-       destination-y specifies the destination directory for all exported
-       headers in the file where it is present.
-
-               Example:
-                       #arch/xtensa/platforms/s6105/include/platform/Kbuild
-                       destination-y := include/linux
-
-       In the example above all exported headers in the Kbuild file
-       will be located in the directory "include/linux" when exported.
-
-       --- 7.4 generic-y
+       --- 7.3 generic-y
 
        If an architecture uses a verbatim copy of a header from
        include/asm-generic then this is listed in the file
@@ -1336,7 +1315,7 @@ See subsequent chapter for the syntax of the Kbuild file.
                Example: termios.h
                        #include <asm-generic/termios.h>
 
-       --- 7.5 generated-y
+       --- 7.4 generated-y
 
        If an architecture generates other header files alongside generic-y
        wrappers, and not included in genhdr-y, then generated-y specifies
@@ -1349,6 +1328,15 @@ See subsequent chapter for the syntax of the Kbuild file.
                        #arch/x86/include/asm/Kbuild
                        generated-y += syscalls_32.h
 
+       --- 7.5 mandatory-y
+
+       mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
+       to define the minimun set of headers that must be exported in
+       include/asm.
+
+       The convention is to list one subdir per line and
+       preferably in alphabetic order.
+
 === 8 Kbuild Variables
 
 The top Makefile exports the following variables: