aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorMartin Waitz <tali@admingilde.org>2005-05-01 11:59:27 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:59:27 -0400
commit8b0c2d989cc60db1767481386ca912e99807eddb (patch)
treed4987614a6171ce7eee3fa63023ce5ed4c45f8f7 /Documentation/DocBook
parentac9296f95228f50d112e6caec3b461fd816de084 (diff)
[PATCH] DocBook: Use xmlto to process the DocBook files.
xmlto uses standared XSLT templates to generate manpages, (x)html pages, and XML FO files which can be processed with passivetex. This is much faster than using jadetex for everything. This patch also reduces the number of kernel-specific scripts that are needed to generate documentation. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/Makefile42
1 files changed, 21 insertions, 21 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 393082c7a3a2..a2441fa99c3f 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -41,14 +41,15 @@ MAN := $(patsubst %.xml, %.9, $(BOOKS))
41mandocs: $(MAN) 41mandocs: $(MAN)
42 42
43installmandocs: mandocs 43installmandocs: mandocs
44 $(MAKEMAN) install Documentation/DocBook/man 44 mkdir -p /usr/local/man/man9/
45 install Documentation/DocBook/man/*.9.gz /usr/local/man/man9/
45 46
46### 47###
47#External programs used 48#External programs used
48KERNELDOC = scripts/kernel-doc 49KERNELDOC = scripts/kernel-doc
49DOCPROC = scripts/basic/docproc 50DOCPROC = scripts/basic/docproc
50SPLITMAN = $(PERL) $(srctree)/scripts/split-man 51
51MAKEMAN = $(PERL) $(srctree)/scripts/makeman 52#XMLTOFLAGS = --skip-validation
52 53
53### 54###
54# DOCPROC is used for two purposes: 55# DOCPROC is used for two purposes:
@@ -95,29 +96,29 @@ $(obj)/procfs-guide.xml: $(C-procfs-example2)
95# Rules to generate postscript, PDF and HTML 96# Rules to generate postscript, PDF and HTML
96# db2html creates a directory. Generate a html file used for timestamp 97# db2html creates a directory. Generate a html file used for timestamp
97 98
98quiet_cmd_db2ps = DB2PS $@ 99quiet_cmd_db2ps = XMLTO $@
99 cmd_db2ps = db2ps -o $(dir $@) $< 100 cmd_db2ps = xmlto ps $(XMLTOFLAGS) -o $(dir $@) $<
100%.ps : %.xml 101%.ps : %.xml
101 @(which db2ps > /dev/null 2>&1) || \ 102 @(which xmlto > /dev/null 2>&1) || \
102 (echo "*** You need to install DocBook stylesheets ***"; \ 103 (echo "*** You need to install DocBook stylesheets ***"; \
103 exit 1) 104 exit 1)
104 $(call cmd,db2ps) 105 $(call cmd,db2ps)
105 106
106quiet_cmd_db2pdf = DB2PDF $@ 107quiet_cmd_db2pdf = XMLTO $@
107 cmd_db2pdf = db2pdf -o $(dir $@) $< 108 cmd_db2pdf = xmlto pdf $(XMLTOFLAGS) -o $(dir $@) $<
108%.pdf : %.xml 109%.pdf : %.xml
109 @(which db2pdf > /dev/null 2>&1) || \ 110 @(which xmlto > /dev/null 2>&1) || \
110 (echo "*** You need to install DocBook stylesheets ***"; \ 111 (echo "*** You need to install DocBook stylesheets ***"; \
111 exit 1) 112 exit 1)
112 $(call cmd,db2pdf) 113 $(call cmd,db2pdf)
113 114
114quiet_cmd_db2html = DB2HTML $@ 115quiet_cmd_db2html = XMLTO $@
115 cmd_db2html = db2html -o $(patsubst %.html,%,$@) $< && \ 116 cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
116 echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/book1.html"> \ 117 echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/book1.html"> \
117 Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ 118 Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
118 119
119%.html: %.xml 120%.html: %.xml
120 @(which db2html > /dev/null 2>&1) || \ 121 @(which xmlto > /dev/null 2>&1) || \
121 (echo "*** You need to install DocBook stylesheets ***"; \ 122 (echo "*** You need to install DocBook stylesheets ***"; \
122 exit 1) 123 exit 1)
123 @rm -rf $@ $(patsubst %.html,%,$@) 124 @rm -rf $@ $(patsubst %.html,%,$@)
@@ -125,15 +126,14 @@ quiet_cmd_db2html = DB2HTML $@
125 @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \ 126 @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \
126 cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi 127 cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
127 128
128### 129quiet_cmd_db2man = XMLTO $@
129# Rule to generate man files - output is placed in the man subdirectory 130 cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi
130 131%.9 : %.xml
131%.9: %.xml 132 @(which xmlto > /dev/null 2>&1) || \
132ifneq ($(KBUILD_SRC),) 133 (echo "*** You need to install DocBook stylesheets ***"; \
133 $(Q)mkdir -p $(objtree)/Documentation/DocBook/man 134 exit 1)
134endif 135 $(call cmd,db2man)
135 $(SPLITMAN) $< $(objtree)/Documentation/DocBook/man "$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)" 136 @touch $@
136 $(MAKEMAN) convert $(objtree)/Documentation/DocBook/man $<
137 137
138### 138###
139# Rules to generate postscripts and PNG imgages from .fig format files 139# Rules to generate postscripts and PNG imgages from .fig format files