aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2008-08-12 18:09:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-12 19:07:30 -0400
commit3794f3e812ef707a4f7931742274d1d0ca6597b4 (patch)
tree9a5373fa2bbcfc1626bb666d2c895e2620f7a3b3 /Makefile
parentbc2aa80e18a1b43ea2b8066500006b729c4ba4a7 (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 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f3e206509ee1..fd3ca6e8188a 100644
--- a/Makefile
+++ b/Makefile
@@ -822,6 +822,9 @@ endif
822ifdef CONFIG_SAMPLES 822ifdef CONFIG_SAMPLES
823 $(Q)$(MAKE) $(build)=samples 823 $(Q)$(MAKE) $(build)=samples
824endif 824endif
825ifdef CONFIG_BUILD_DOCSRC
826 $(Q)$(MAKE) $(build)=Documentation
827endif
825 $(call vmlinux-modpost) 828 $(call vmlinux-modpost)
826 $(call if_changed_rule,vmlinux__) 829 $(call if_changed_rule,vmlinux__)
827 $(Q)rm -f .old_version 830 $(Q)rm -f .old_version
@@ -1166,7 +1169,7 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \
1166# 1169#
1167clean: rm-dirs := $(CLEAN_DIRS) 1170clean: rm-dirs := $(CLEAN_DIRS)
1168clean: rm-files := $(CLEAN_FILES) 1171clean: rm-files := $(CLEAN_FILES)
1169clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) 1172clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation)
1170 1173
1171PHONY += $(clean-dirs) clean archclean 1174PHONY += $(clean-dirs) clean archclean
1172$(clean-dirs): 1175$(clean-dirs):