aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-13 15:20:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-13 15:20:01 -0400
commit80a04d3f2f94fb68b5df05e3ac6697130bc3467a (patch)
tree792449152961db67e4a2855af4518db55822ff64 /Documentation
parenteebb2afb82c4f999e850d198af26ce6969d0f47a (diff)
parent2810ae8c73cbfb37891aa99dfbca46ffd40dbc91 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes: docbook: make cleandocs kbuild: fix spurious initramfs rebuild Documentation: explain the difference between __bitwise and __bitwise__ kbuild: make it possible for the linker to discard local symbols from vmlinux kbuild: remove pointless strdup() on arguments passed to new_module() in modpost kbuild: fix a few typos in top-level Makefile kbuild: introduce destination-y for exported headers kbuild: use git svn instead of git-svn in setlocalversion kconfig: fix update-po-config to accect backslash in input kbuild: fix option processing for -I in headerdep
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/Makefile11
-rw-r--r--Documentation/kbuild/makefiles.txt83
-rw-r--r--Documentation/sparse.txt8
3 files changed, 91 insertions, 11 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index a3a83d38f96f..8918a32c6b3a 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -31,7 +31,7 @@ PS_METHOD = $(prefer-db2x)
31 31
32### 32###
33# The targets that may be used. 33# The targets that may be used.
34PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs 34PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs
35 35
36BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 36BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
37xmldocs: $(BOOKS) 37xmldocs: $(BOOKS)
@@ -213,11 +213,12 @@ silent_gen_xml = :
213dochelp: 213dochelp:
214 @echo ' Linux kernel internal documentation in different formats:' 214 @echo ' Linux kernel internal documentation in different formats:'
215 @echo ' htmldocs - HTML' 215 @echo ' htmldocs - HTML'
216 @echo ' installmandocs - install man pages generated by mandocs'
217 @echo ' mandocs - man pages'
218 @echo ' pdfdocs - PDF' 216 @echo ' pdfdocs - PDF'
219 @echo ' psdocs - Postscript' 217 @echo ' psdocs - Postscript'
220 @echo ' xmldocs - XML DocBook' 218 @echo ' xmldocs - XML DocBook'
219 @echo ' mandocs - man pages'
220 @echo ' installmandocs - install man pages generated by mandocs'
221 @echo ' cleandocs - clean all generated DocBook files'
221 222
222### 223###
223# Temporary files left by various tools 224# Temporary files left by various tools
@@ -235,6 +236,10 @@ clean-files := $(DOCBOOKS) \
235 236
236clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man 237clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
237 238
239cleandocs:
240 $(Q)rm -f $(call objectify, $(clean-files))
241 $(Q)rm -rf $(call objectify, $(clean-dirs))
242
238# Declare the contents of the .PHONY variable as phony. We keep that 243# Declare the contents of the .PHONY variable as phony. We keep that
239# information in a variable se we can use it in if_changed and friends. 244# information in a variable se we can use it in if_changed and friends.
240 245
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 51104f9194a5..d4b05672f9f7 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -40,10 +40,16 @@ This document describes the Linux kernel Makefiles.
40 --- 6.7 Custom kbuild commands 40 --- 6.7 Custom kbuild commands
41 --- 6.8 Preprocessing linker scripts 41 --- 6.8 Preprocessing linker scripts
42 42
43 === 7 Kbuild Variables 43 === 7 Kbuild syntax for exported headers
44 === 8 Makefile language 44 --- 7.1 header-y
45 === 9 Credits 45 --- 7.2 objhdr-y
46 === 10 TODO 46 --- 7.3 destination-y
47 --- 7.4 unifdef-y (deprecated)
48
49 === 8 Kbuild Variables
50 === 9 Makefile language
51 === 10 Credits
52 === 11 TODO
47 53
48=== 1 Overview 54=== 1 Overview
49 55
@@ -1143,8 +1149,69 @@ When kbuild executes, the following steps are followed (roughly):
1143 The kbuild infrastructure for *lds file are used in several 1149 The kbuild infrastructure for *lds file are used in several
1144 architecture-specific files. 1150 architecture-specific files.
1145 1151
1152=== 7 Kbuild syntax for exported headers
1153
1154The kernel include a set of headers that is exported to userspace.
1155Many headers can be exported as-is but other headers requires a
1156minimal pre-processing before they are ready for user-space.
1157The pre-processing does:
1158- drop kernel specific annotations
1159- drop include of compiler.h
1160- drop all sections that is kernel internat (guarded by ifdef __KERNEL__)
1161
1162Each relevant directory contain a file name "Kbuild" which specify the
1163headers to be exported.
1164See subsequent chapter for the syntax of the Kbuild file.
1165
1166 --- 7.1 header-y
1167
1168 header-y specify header files to be exported.
1169
1170 Example:
1171 #include/linux/Kbuild
1172 header-y += usb/
1173 header-y += aio_abi.h
1174
1175 The convention is to list one file per line and
1176 preferably in alphabetic order.
1177
1178 header-y also specify which subdirectories to visit.
1179 A subdirectory is identified by a trailing '/' which
1180 can be seen in the example above for the usb subdirectory.
1181
1182 Subdirectories are visited before their parent directories.
1183
1184 --- 7.2 objhdr-y
1185
1186 objhdr-y specifies generated files to be exported.
1187 Generated files are special as they need to be looked
1188 up in another directory when doing 'make O=...' builds.
1189
1190 Example:
1191 #include/linux/Kbuild
1192 objhdr-y += version.h
1193
1194 --- 7.3 destination-y
1195
1196 When an architecture have a set of exported headers that needs to be
1197 exported to a different directory destination-y is used.
1198 destination-y specify the destination directory for all exported
1199 headers in the file where it is present.
1200
1201 Example:
1202 #arch/xtensa/platforms/s6105/include/platform/Kbuild
1203 destination-y := include/linux
1204
1205 In the example above all exported headers in the Kbuild file
1206 will be located in the directory "include/linux" when exported.
1207
1208
1209 --- 7.4 unifdef-y (deprecated)
1210
1211 unifdef-y is deprecated. A direct replacement is header-y.
1212
1146 1213
1147=== 7 Kbuild Variables 1214=== 8 Kbuild Variables
1148 1215
1149The top Makefile exports the following variables: 1216The top Makefile exports the following variables:
1150 1217
@@ -1206,7 +1273,7 @@ The top Makefile exports the following variables:
1206 INSTALL_MOD_STRIP will used as the option(s) to the strip command. 1273 INSTALL_MOD_STRIP will used as the option(s) to the strip command.
1207 1274
1208 1275
1209=== 8 Makefile language 1276=== 9 Makefile language
1210 1277
1211The kernel Makefiles are designed to be run with GNU Make. The Makefiles 1278The kernel Makefiles are designed to be run with GNU Make. The Makefiles
1212use only the documented features of GNU Make, but they do use many 1279use only the documented features of GNU Make, but they do use many
@@ -1225,14 +1292,14 @@ time the left-hand side is used.
1225There are some cases where "=" is appropriate. Usually, though, ":=" 1292There are some cases where "=" is appropriate. Usually, though, ":="
1226is the right choice. 1293is the right choice.
1227 1294
1228=== 9 Credits 1295=== 10 Credits
1229 1296
1230Original version made by Michael Elizabeth Chastain, <mailto:mec@shout.net> 1297Original version made by Michael Elizabeth Chastain, <mailto:mec@shout.net>
1231Updates by Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> 1298Updates by Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
1232Updates by Sam Ravnborg <sam@ravnborg.org> 1299Updates by Sam Ravnborg <sam@ravnborg.org>
1233Language QA by Jan Engelhardt <jengelh@gmx.de> 1300Language QA by Jan Engelhardt <jengelh@gmx.de>
1234 1301
1235=== 10 TODO 1302=== 11 TODO
1236 1303
1237- Describe how kbuild supports shipped files with _shipped. 1304- Describe how kbuild supports shipped files with _shipped.
1238- Generating offset header files. 1305- Generating offset header files.
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt
index 42f43fa59f24..34c76a55bc04 100644
--- a/Documentation/sparse.txt
+++ b/Documentation/sparse.txt
@@ -42,6 +42,14 @@ sure that bitwise types don't get mixed up (little-endian vs big-endian
42vs cpu-endian vs whatever), and there the constant "0" really _is_ 42vs cpu-endian vs whatever), and there the constant "0" really _is_
43special. 43special.
44 44
45__bitwise__ - to be used for relatively compact stuff (gfp_t, etc.) that
46is mostly warning-free and is supposed to stay that way. Warnings will
47be generated without __CHECK_ENDIAN__.
48
49__bitwise - noisy stuff; in particular, __le*/__be* are that. We really
50don't want to drown in noise unless we'd explicitly asked for it.
51
52
45Getting sparse 53Getting sparse
46~~~~~~~~~~~~~~ 54~~~~~~~~~~~~~~
47 55