diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2012-09-28 13:47:07 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-24 17:30:48 -0400 |
commit | af3df2cf17f5df079189c3cc88870d28e219496b (patch) | |
tree | fc0e6ea775be9bc10e16d2aab31f018f4b027c0c /tools/perf/Documentation | |
parent | 814d7a4d2c33657489f7b45bc0b2dcaa0d88edc0 (diff) |
perf tools: Try to build Documentation when installing
There's a portion in the "perf list" output refering to the exact
specification of raw hardware events.
Since this description is in the perf-list manpage, try to build and
install the man pages, warning the user when that is not possible
due to missing packages (xmlto and asciidoc).
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-ij71ysszkdvz3fy3wr331bke@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Documentation')
-rw-r--r-- | tools/perf/Documentation/Makefile | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile index 9f2e44f2b17a..ef6d22e879eb 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) |
@@ -246,7 +273,7 @@ $(MAN_HTML): $(OUTPUT)%.html : %.txt | |||
246 | 273 | ||
247 | $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml | 274 | $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml |
248 | $(QUIET_XMLTO)$(RM) $@ && \ | 275 | $(QUIET_XMLTO)$(RM) $@ && \ |
249 | xmlto -o $(OUTPUT) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< | 276 | $(XMLTO) -o $(OUTPUT) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< |
250 | 277 | ||
251 | $(OUTPUT)%.xml : %.txt | 278 | $(OUTPUT)%.xml : %.txt |
252 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ | 279 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ |