diff options
Diffstat (limited to 'tools/perf/Documentation/Makefile')
-rw-r--r-- | tools/perf/Documentation/Makefile | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile index 9f2e44f2b17a..eb30044a922a 100644 --- a/tools/perf/Documentation/Makefile +++ b/tools/perf/Documentation/Makefile | |||
@@ -1,3 +1,5 @@ | |||
1 | include ../config/utilities.mak | ||
2 | |||
1 | OUTPUT := ./ | 3 | OUTPUT := ./ |
2 | ifeq ("$(origin O)", "command line") | 4 | ifeq ("$(origin O)", "command line") |
3 | ifneq ($(O),) | 5 | ifneq ($(O),) |
@@ -64,6 +66,7 @@ MAKEINFO=makeinfo | |||
64 | INSTALL_INFO=install-info | 66 | INSTALL_INFO=install-info |
65 | DOCBOOK2X_TEXI=docbook2x-texi | 67 | DOCBOOK2X_TEXI=docbook2x-texi |
66 | DBLATEX=dblatex | 68 | DBLATEX=dblatex |
69 | XMLTO=xmlto | ||
67 | ifndef PERL_PATH | 70 | ifndef PERL_PATH |
68 | PERL_PATH = /usr/bin/perl | 71 | PERL_PATH = /usr/bin/perl |
69 | endif | 72 | endif |
@@ -71,6 +74,16 @@ endif | |||
71 | -include ../config.mak.autogen | 74 | -include ../config.mak.autogen |
72 | -include ../config.mak | 75 | -include ../config.mak |
73 | 76 | ||
77 | _tmp_tool_path := $(call get-executable,$(ASCIIDOC)) | ||
78 | ifeq ($(_tmp_tool_path),) | ||
79 | missing_tools = $(ASCIIDOC) | ||
80 | endif | ||
81 | |||
82 | _tmp_tool_path := $(call get-executable,$(XMLTO)) | ||
83 | ifeq ($(_tmp_tool_path),) | ||
84 | missing_tools += $(XMLTO) | ||
85 | endif | ||
86 | |||
74 | # | 87 | # |
75 | # For asciidoc ... | 88 | # For asciidoc ... |
76 | # -7.1.2, no extra settings are needed. | 89 | # -7.1.2, no extra settings are needed. |
@@ -170,7 +183,12 @@ pdf: $(OUTPUT)user-manual.pdf | |||
170 | 183 | ||
171 | install: install-man | 184 | install: install-man |
172 | 185 | ||
173 | install-man: man | 186 | check-man-tools: |
187 | ifdef missing_tools | ||
188 | $(error "You need to install $(missing_tools) for man pages") | ||
189 | endif | ||
190 | |||
191 | do-install-man: man | ||
174 | $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) | 192 | $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) |
175 | # $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) | 193 | # $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) |
176 | # $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir) | 194 | # $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir) |
@@ -178,6 +196,15 @@ install-man: man | |||
178 | # $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) | 196 | # $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) |
179 | # $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) | 197 | # $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) |
180 | 198 | ||
199 | install-man: check-man-tools man | ||
200 | |||
201 | try-install-man: | ||
202 | ifdef missing_tools | ||
203 | $(warning Please install $(missing_tools) to have the man pages installed) | ||
204 | else | ||
205 | $(MAKE) do-install-man | ||
206 | endif | ||
207 | |||
181 | install-info: info | 208 | install-info: info |
182 | $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) | 209 | $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) |
183 | $(INSTALL) -m 644 $(OUTPUT)perf.info $(OUTPUT)perfman.info $(DESTDIR)$(infodir) | 210 | $(INSTALL) -m 644 $(OUTPUT)perf.info $(OUTPUT)perfman.info $(DESTDIR)$(infodir) |
@@ -195,10 +222,14 @@ install-pdf: pdf | |||
195 | #install-html: html | 222 | #install-html: html |
196 | # '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir) | 223 | # '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir) |
197 | 224 | ||
225 | ifneq ($(MAKECMDGOALS),clean) | ||
226 | ifneq ($(MAKECMDGOALS),tags) | ||
198 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE | 227 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE |
199 | $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) $(OUTPUT)PERF-VERSION-FILE | 228 | $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) $(OUTPUT)PERF-VERSION-FILE |
200 | 229 | ||
201 | -include $(OUTPUT)PERF-VERSION-FILE | 230 | -include $(OUTPUT)PERF-VERSION-FILE |
231 | endif | ||
232 | endif | ||
202 | 233 | ||
203 | # | 234 | # |
204 | # Determine "include::" file references in asciidoc files. | 235 | # Determine "include::" file references in asciidoc files. |
@@ -246,7 +277,7 @@ $(MAN_HTML): $(OUTPUT)%.html : %.txt | |||
246 | 277 | ||
247 | $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml | 278 | $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml |
248 | $(QUIET_XMLTO)$(RM) $@ && \ | 279 | $(QUIET_XMLTO)$(RM) $@ && \ |
249 | xmlto -o $(OUTPUT) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< | 280 | $(XMLTO) -o $(OUTPUT) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< |
250 | 281 | ||
251 | $(OUTPUT)%.xml : %.txt | 282 | $(OUTPUT)%.xml : %.txt |
252 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ | 283 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ |