[PATCH] perf tools: Build docs with 'make all'

From: Robert Richter
Date: Thu Jul 18 2013 - 11:57:20 EST


Build documentation with 'make all', not 'make install'. We use the
new target try-man for this which is similar implemented as
try-install-man. Thus, building the doc is skipped if tools for this
are missing.

Signed-off-by: Robert Richter <robert.richter@xxxxxxxxxx>
Signed-off-by: Robert Richter <rric@xxxxxxxxxx>
---
tools/perf/Documentation/Makefile | 6 ++++--
tools/perf/Makefile | 7 +++++--
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index 5a37a7c..47df22d 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -182,6 +182,8 @@ ifdef missing_tools
$(error "You need to install $(missing_tools) for man pages")
endif

+do-man: man
+
do-install-man: man
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir)
@@ -192,11 +194,11 @@ do-install-man: man

install-man: check-man-tools man

-try-install-man:
+try-install-man try-man:
ifdef missing_tools
$(warning Please install $(missing_tools) to have the man pages installed)
else
- $(MAKE) do-install-man
+ $(MAKE) $(patsubst try-%,do-%,$@)
endif

install-info: info
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 1d718a9..8781de7 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -522,7 +522,7 @@ export INSTALL SHELL_PATH

SHELL = $(SHELL_PATH)

-all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
+all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) try-man

please_set_SHELL_PATH_to_a_more_modern_shell:
@$$(:)
@@ -710,9 +710,12 @@ endif

DOC_TARGETS := doc man html info pdf

-INSTALL_DOC_TARGETS := $(patsubst %,install-%,$(DOC_TARGETS)) try-install-man
+INSTALL_DOC_TARGETS := $(patsubst %,install-%,$(DOC_TARGETS))
INSTALL_DOC_TARGETS += quick-install-doc quick-install-man quick-install-html

+DOC_TARGETS += try-man
+INSTALL_DOC_TARGETS += try-install-man
+
# 'make doc' should call 'make -C Documentation all'
$(DOC_TARGETS):
$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:doc=all)
--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/