Lines Matching +full:- +full:- +full:build +full:- +full:dir
3 # primarily based on in-line comments in various source files.
4 # See Documentation/kernel-doc-nano-HOWTO.txt for instruction in how
5 # to document the SRC - and how to read it.
9 # SPDX-License-Identifier: GPL-2.0
15 # The build process is as follows (targets):
17 # file.tmpl --> file.xml +--> file.ps (psdocs) [by db2ps or xmlto]
18 # +--> file.pdf (pdfdocs) [by db2pdf or xmlto]
19 # +--> DIR=file (htmldocs) [by xmlto]
20 # +--> man/ (mandocs) [by xmlto]
23 # for PDF and PS output you can choose between xmlto and docbook-utils tools
24 PDF_METHOD = $(prefer-db2x)
25 PS_METHOD = $(prefer-db2x)
51 $(if $(wildcard $(obj)/man/*.9),gzip -f $(obj)/man/*.9)
54 mkdir -p /usr/local/man/man9/
59 KERNELDOC = $(srctree)/scripts/kernel-doc
62 XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl
63 XMLTOFLAGS += --skip-validation
68 # 2) To preprocess a .tmpl file and call kernel-doc with
75 set -e; \
81 ) > $(dir $@).$(notdir $@).cmd
87 # Tell kbuild to always build the programs
88 always := $(hostprogs-y)
90 notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \
92 db2xtemplate = db2TYPE -o $(dir $@) $<
93 xmltotemplate = xmlto TYPE $(XMLTOFLAGS) -o $(dir $@) $<
97 use-db2x = db2x
98 prefer-db2x = db2x
100 use-db2x = notfound
101 prefer-db2x = $(use-xmlto)
104 use-xmlto = xmlto
105 prefer-xmlto = xmlto
107 use-xmlto = notfound
108 prefer-xmlto = $(use-db2x)
125 build_main_index = rm -rf $(main_idx); \
126 echo '<h1>U-Boot Bootloader HTML Documentation</h1>' >> $(main_idx) && \
127 echo '<h2>U-Boot Version: $(UBOOTVERSION)</h2>' >> $(main_idx) && \
131 cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
139 @rm -rf $@ $(patsubst %.html,%,$@)
141 @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \
142 cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
145 cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; fi
150 $(Q)mkdir -p $(obj)/man
157 cmd_fig2eps = fig2dev -Leps $< $@
166 cmd_fig2png = fig2dev -Lpng $< $@
183 expand --tabs=8 < $< | \
184 sed -e "s/&/\\&/g" \
185 -e "s/</\\</g" \
186 -e "s/>/\\>/g"; \
190 # Help targets as used by the top-level makefile
192 @echo ' U-Boot bootloader internal documentation in different formats:'
193 @echo ' htmldocs - HTML'
194 @echo ' pdfdocs - PDF'
195 @echo ' psdocs - Postscript'
196 @echo ' xmldocs - XML DocBook'
197 @echo ' mandocs - man pages'
198 @echo ' installmandocs - install man pages generated by mandocs'
199 @echo ' cleandocs - clean all generated DocBook files'
203 clean-files := $(DOCBOOKS) \
215 clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
218 $(Q)rm -f $(call objectify, $(clean-files))
219 $(Q)rm -rf $(call objectify, $(clean-dirs))