@@ -39,8 +39,8 @@ htmldocs: $(HTML)
39
39
40
40
# ##
41
41
# External programs used
42
- KERNELDOC = $( objtree ) / scripts/kernel-doc
43
- DOCPROC = $( objtree ) / scripts/docproc
42
+ KERNELDOC = scripts/kernel-doc
43
+ DOCPROC = scripts/docproc
44
44
45
45
# ##
46
46
# DOCPROC is used for two purposes:
@@ -50,14 +50,14 @@ DOCPROC=$(objtree)/scripts/docproc
50
50
# The following rules are used to generate the .sgml documentation
51
51
# required to generate the final targets. (ps, pdf, html).
52
52
quiet_cmd_docproc = DOCPROC $@
53
- cmd_docproc = $(DOCPROC ) doc $< >$@
53
+ cmd_docproc = $(DOCPROC ) doc $< >$@
54
54
define rule_docproc
55
- set -e
56
- $(if $($(quiet ) cmd_$(1 ) ) ,echo ' $($(quiet ) cmd_$(1 ) ) ';)
57
- $(cmd_$(1 ) ) ; \
58
- ( \
59
- echo 'cmd_$@ := $(cmd_$(1 ) ) '; \
60
- echo $@ : `$(DOCPROC ) depend $< `; \
55
+ set -e; \
56
+ $(if $($(quiet ) cmd_$(1 ) ) ,echo ' $($(quiet ) cmd_$(1 ) ) ';) \
57
+ $(cmd_$(1 ) ) ; \
58
+ ( \
59
+ echo 'cmd_$@ := $(cmd_$(1 ) ) '; \
60
+ echo $@ : `$(DOCPROC ) depend $< `; \
61
61
) > $(dir $@ ) .$(notdir $@ ) .cmd
62
62
endef
63
63
@@ -96,41 +96,55 @@ $(obj)/parportbook.ps $(obj)/parportbook.pdf: $(EPS-parportbook) $(PNG-parportbo
96
96
# ##
97
97
# Rules to generate postscript, PDF and HTML
98
98
# db2html creates a directory. Generate a html file used for timestamp
99
+
100
+ quiet_cmd_db2ps = DB2PS $@
101
+ cmd_db2ps = db2ps -o $(dir $@ ) $<
99
102
% .ps : % .sgml
100
103
@ (which db2ps > /dev/null 2>&1 ) || \
101
104
(echo " *** You need to install DocBook stylesheets ***" ; \
102
105
exit 1)
103
- $(call do_cmd,DB2PS $@ , db2ps -o $( dir $@ ) $< )
106
+ $(call cmd, db2ps)
104
107
108
+ quiet_cmd_db2pdf = DB2PDF $@
109
+ cmd_db2pdf = db2pdf -o $(dir $@ ) $<
105
110
% .pdf : % .sgml
106
111
@ (which db2pdf > /dev/null 2>&1 ) || \
107
112
(echo " *** You need to install DocBook stylesheets ***" ; \
108
113
exit 1)
109
- $(call do_cmd,DB2PDF $@ ,db2pdf -o $(dir $@ ) $< )
114
+ $(call cmd,db2pdf)
115
+
116
+ quiet_cmd_db2html = DB2HTML $@
117
+ cmd_db2html = db2html -o $(patsubst % .html,% ,$@ ) $< && \
118
+ echo '<a HREF="$(patsubst % .html,% ,$(notdir $@ ) ) /book1.html"> \
119
+ Goto $(patsubst % .html,% ,$(notdir $@ ) ) </a><p>' > $@
110
120
111
121
% .html : % .sgml
112
122
@ (which db2html > /dev/null 2>&1 ) || \
113
123
(echo " *** You need to install DocBook stylesheets ***" ; \
114
124
exit 1)
115
125
@rm -rf $@ $(patsubst % .html,% ,$@ )
116
- $(call do_cmd,DB2HTML $@ ,db2html -o $(patsubst % .html,% ,$@ ) $< && \
117
- echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/book1.html">\
118
- Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@)
126
+ $(call cmd,db2html)
119
127
@if [ ! -z " $( PNG-$( basename $( notdir $@ ) ) ) " ]; then \
120
128
cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
121
129
122
130
# ##
123
131
# Rules to generate postscripts and PNG imgages from .fig format files
132
+ quiet_cmd_fig2eps = FIG2EPS $@
133
+ cmd_fig2eps = fig2dev -Leps $< $@
134
+
124
135
% .eps : % .fig
125
- $(call do_cmd,FIG2DEV -Leps $@ ,fig2dev -Leps $< $@ )
136
+ $(call cmd,fig2eps)
137
+
138
+ quiet_cmd_fig2png = FIG2PNG $@
139
+ cmd_fig2png = fig2dev -Lpng $< $@
126
140
127
141
% .png : % .fig
128
- $(call do_cmd,FIG2DEV -Lpng $@ ,fig2dev -Lpng $< $@ )
142
+ $(call cmd,fig2png )
129
143
130
144
# ##
131
145
# Rule to convert a .c file to inline SGML documentation
132
146
% .sgml : % .c
133
- @echo ' Generating $@'
147
+ @echo ' GEN $@'
134
148
@ ( \
135
149
echo " <programlisting>" ; \
136
150
expand --tabs=8 < $< | \
0 commit comments