Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Randy Dunlap and committed by
Linus Torvalds
3794f3e8 bc2aa80e

+118 -1
+7
Documentation/DocBook/Makefile
··· 102 102 C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) 103 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 112 notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ 106 113 exit 1 107 114 db2xtemplate = db2TYPE -o $(dir $@) $<
+3
Documentation/Makefile
··· 1 + obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ 2 + filesystems/configfs/ ia64/ networking/ \ 3 + pcmcia/ spi/ video4linux/ vm/ watchdog/src/
+10
Documentation/accounting/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := getdelays 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y) 9 + 10 + HOSTCFLAGS_getdelays.o += -I$(objtree)/usr/include
+10
Documentation/auxdisplay/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := cfag12864b-example 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y) 9 + 10 + HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include
+11
Documentation/connector/Makefile
··· 1 + ifneq ($(CONFIG_CONNECTOR),) 2 + obj-m += cn_test.o 3 + endif 4 + 5 + # List of programs to build 6 + hostprogs-y := ucon 7 + 8 + # Tell kbuild to always build the programs 9 + always := $(hostprogs-y) 10 + 11 + HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include
+3
Documentation/filesystems/configfs/Makefile
··· 1 + ifneq ($(CONFIG_CONFIGFS_FS),) 2 + obj-m += configfs_example_explicit.o configfs_example_macros.o 3 + endif
+8
Documentation/ia64/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := aliasing-test 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y)
+8
Documentation/networking/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := ifenslave 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y)
+10
Documentation/pcmcia/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := crc32hash 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y) 9 + 10 + HOSTCFLAGS_crc32hash.o += -I$(objtree)/usr/include
+11
Documentation/spi/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := spidev_test spidev_fdx 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y) 9 + 10 + HOSTCFLAGS_spidev_test.o += -I$(objtree)/usr/include 11 + HOSTCFLAGS_spidev_fdx.o += -I$(objtree)/usr/include
+8
Documentation/video4linux/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := v4lgrab 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y)
+8
Documentation/vm/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := slabinfo 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y)
+8
Documentation/watchdog/src/Makefile
··· 1 + # kbuild trick to avoid linker error. Can be omitted if a module is built. 2 + obj- := dummy.o 3 + 4 + # List of programs to build 5 + hostprogs-y := watchdog-simple watchdog-test 6 + 7 + # Tell kbuild to always build the programs 8 + always := $(hostprogs-y)
+4 -1
Makefile
··· 822 822 ifdef CONFIG_SAMPLES 823 823 $(Q)$(MAKE) $(build)=samples 824 824 endif 825 + ifdef CONFIG_BUILD_DOCSRC 826 + $(Q)$(MAKE) $(build)=Documentation 827 + endif 825 828 $(call vmlinux-modpost) 826 829 $(call if_changed_rule,vmlinux__) 827 830 $(Q)rm -f .old_version ··· 1169 1166 # 1170 1167 clean: rm-dirs := $(CLEAN_DIRS) 1171 1168 clean: rm-files := $(CLEAN_FILES) 1172 - clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) 1169 + clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) 1173 1170 1174 1171 PHONY += $(clean-dirs) clean archclean 1175 1172 $(clean-dirs):
+9
lib/Kconfig.debug
··· 735 735 736 736 If unsure, say N. 737 737 738 + menuconfig BUILD_DOCSRC 739 + bool "Build targets in Documentation/ tree" 740 + depends on HEADERS_CHECK 741 + help 742 + This option attempts to build objects from the source files in the 743 + kernel Documentation/ tree. 744 + 745 + Say N if you are unsure. 746 + 738 747 source "samples/Kconfig" 739 748 740 749 source "lib/Kconfig.kgdb"