diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2008-08-12 18:09:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-12 19:07:30 -0400 |
commit | 3794f3e812ef707a4f7931742274d1d0ca6597b4 (patch) | |
tree | 9a5373fa2bbcfc1626bb666d2c895e2620f7a3b3 /Documentation/DocBook | |
parent | bc2aa80e18a1b43ea2b8066500006b729c4ba4a7 (diff) |
docsrc: build Documentation/ sources
Currently source files in the Documentation/ sub-dir can easily bit-rot
since they are not generally buildable, either because they are hidden in
text files or because there are no Makefile rules for them. This needs to
be fixed so that the source files remain usable and good examples of code
instead of bad examples.
Add the ability to build source files that are in the Documentation/ dir.
Add to Kconfig as "BUILD_DOCSRC" config symbol.
Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
Documentation/ sources. Or enable BUILD_DOCSRC in the *config system.
However, this symbol depends on HEADERS_CHECK since the header files need
to be installed (for userspace builds).
Built (using cross-tools) for x86-64, i386, alpha, ia64, sparc32,
sparc64, powerpc, sh, m68k, & mips.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 1d1b34500b69..1615350b7b53 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -102,6 +102,13 @@ C-procfs-example = procfs_example.xml | |||
102 | C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) | 102 | C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) |
103 | $(obj)/procfs-guide.xml: $(C-procfs-example2) | 103 | $(obj)/procfs-guide.xml: $(C-procfs-example2) |
104 | 104 | ||
105 | # List of programs to build | ||
106 | ##oops, this is a kernel module::hostprogs-y := procfs_example | ||
107 | obj-m += procfs_example.o | ||
108 | |||
109 | # Tell kbuild to always build the programs | ||
110 | always := $(hostprogs-y) | ||
111 | |||
105 | notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ | 112 | notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ |
106 | exit 1 | 113 | exit 1 |
107 | db2xtemplate = db2TYPE -o $(dir $@) $< | 114 | db2xtemplate = db2TYPE -o $(dir $@) $< |