aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/Makefile
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-05-20 16:27:44 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-05-20 16:27:44 -0400
commitad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 (patch)
treead434400f5ecaa33b433c8f830e40792d8d6c05c /Documentation/DocBook/Makefile
parent90356ac3194bf91a441a5f9c3067af386ef62462 (diff)
parent88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff)
merge by hand - fix up rejections in Documentation/DocBook/Makefile
Diffstat (limited to 'Documentation/DocBook/Makefile')
-rw-r--r--Documentation/DocBook/Makefile60
1 files changed, 30 insertions, 30 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index e69d68659455..87da3478fada 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -7,11 +7,10 @@
7# list of DOCBOOKS. 7# list of DOCBOOKS.
8 8
9DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ 9DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
10 kernel-hacking.xml kernel-locking.xml via-audio.xml \ 10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
11 deviceiobook.xml procfs-guide.xml tulip-user.xml \ 11 procfs-guide.xml writing_usb_driver.xml \
12 writing_usb_driver.xml sis900.xml kernel-api.xml \ 12 sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \
13 journal-api.xml lsm.xml usb.xml gadget.xml libata.xml \ 13 gadget.xml libata.xml mtdnand.xml librs.xml
14 mtdnand.xml librs.xml
15 14
16### 15###
17# The build process is as follows (targets): 16# The build process is as follows (targets):
@@ -42,14 +41,16 @@ MAN := $(patsubst %.xml, %.9, $(BOOKS))
42mandocs: $(MAN) 41mandocs: $(MAN)
43 42
44installmandocs: mandocs 43installmandocs: mandocs
45 $(MAKEMAN) install Documentation/DocBook/man 44 mkdir -p /usr/local/man/man9/
45 install Documentation/DocBook/man/*.9.gz /usr/local/man/man9/
46 46
47### 47###
48#External programs used 48#External programs used
49KERNELDOC = scripts/kernel-doc 49KERNELDOC = scripts/kernel-doc
50DOCPROC = scripts/basic/docproc 50DOCPROC = scripts/basic/docproc
51SPLITMAN = $(PERL) $(srctree)/scripts/split-man 51
52MAKEMAN = $(PERL) $(srctree)/scripts/makeman 52XMLTOFLAGS = -m Documentation/DocBook/stylesheet.xsl
53#XMLTOFLAGS += --skip-validation
53 54
54### 55###
55# DOCPROC is used for two purposes: 56# DOCPROC is used for two purposes:
@@ -96,45 +97,44 @@ $(obj)/procfs-guide.xml: $(C-procfs-example2)
96# Rules to generate postscript, PDF and HTML 97# Rules to generate postscript, PDF and HTML
97# db2html creates a directory. Generate a html file used for timestamp 98# db2html creates a directory. Generate a html file used for timestamp
98 99
99quiet_cmd_db2ps = DB2PS $@ 100quiet_cmd_db2ps = XMLTO $@
100 cmd_db2ps = db2ps -o $(dir $@) $< 101 cmd_db2ps = xmlto ps $(XMLTOFLAGS) -o $(dir $@) $<
101%.ps : %.xml 102%.ps : %.xml
102 @(which db2ps > /dev/null 2>&1) || \ 103 @(which xmlto > /dev/null 2>&1) || \
103 (echo "*** You need to install DocBook stylesheets ***"; \ 104 (echo "*** You need to install xmlto ***"; \
104 exit 1) 105 exit 1)
105 $(call cmd,db2ps) 106 $(call cmd,db2ps)
106 107
107quiet_cmd_db2pdf = DB2PDF $@ 108quiet_cmd_db2pdf = XMLTO $@
108 cmd_db2pdf = db2pdf -o $(dir $@) $< 109 cmd_db2pdf = xmlto pdf $(XMLTOFLAGS) -o $(dir $@) $<
109%.pdf : %.xml 110%.pdf : %.xml
110 @(which db2pdf > /dev/null 2>&1) || \ 111 @(which xmlto > /dev/null 2>&1) || \
111 (echo "*** You need to install DocBook stylesheets ***"; \ 112 (echo "*** You need to install xmlto ***"; \
112 exit 1) 113 exit 1)
113 $(call cmd,db2pdf) 114 $(call cmd,db2pdf)
114 115
115quiet_cmd_db2html = DB2HTML $@ 116quiet_cmd_db2html = XMLTO $@
116 cmd_db2html = db2html -o $(patsubst %.html,%,$@) $< && \ 117 cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
117 echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/book1.html"> \ 118 echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
118 Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ 119 Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
119 120
120%.html: %.xml 121%.html: %.xml
121 @(which db2html > /dev/null 2>&1) || \ 122 @(which xmlto > /dev/null 2>&1) || \
122 (echo "*** You need to install DocBook stylesheets ***"; \ 123 (echo "*** You need to install xmlto ***"; \
123 exit 1) 124 exit 1)
124 @rm -rf $@ $(patsubst %.html,%,$@) 125 @rm -rf $@ $(patsubst %.html,%,$@)
125 $(call cmd,db2html) 126 $(call cmd,db2html)
126 @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \ 127 @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \
127 cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi 128 cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
128 129
129### 130quiet_cmd_db2man = XMLTO $@
130# Rule to generate man files - output is placed in the man subdirectory 131 cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi
131 132%.9 : %.xml
132%.9: %.xml 133 @(which xmlto > /dev/null 2>&1) || \
133ifneq ($(KBUILD_SRC),) 134 (echo "*** You need to install xmlto ***"; \
134 $(Q)mkdir -p $(objtree)/Documentation/DocBook/man 135 exit 1)
135endif 136 $(call cmd,db2man)
136 $(SPLITMAN) $< $(objtree)/Documentation/DocBook/man "$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)" 137 @touch $@
137 $(MAKEMAN) convert $(objtree)/Documentation/DocBook/man $<
138 138
139### 139###
140# Rules to generate postscripts and PNG imgages from .fig format files 140# Rules to generate postscripts and PNG imgages from .fig format files