diff --git i/tools/perf/Documentation/Makefile w/tools/perf/Documentation/Makefile index ac841bc5c35b..52e3c48f3285 100644 --- i/tools/perf/Documentation/Makefile +++ w/tools/perf/Documentation/Makefile @@ -194,14 +194,16 @@ ifdef missing_tools $(error "You need to install $(missing_tools) for man pages") endif -do-install-man: man +do-install-man: $(addprefix install-man-,$(_DOC_MAN1)) + +install-man-perf.1: $(OUTPUT)perf.1 + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) + sed -e 's/"PERF"/"PERF_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 + +install-man-perf%.1: $(OUTPUT)perf%.1 $(call QUIET_INSTALL, Documentation-man) \ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir); \ -# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir); \ -# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir); \ - $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); \ -# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \ -# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) + sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 install-man: check-man-tools man do-install-man diff --git i/tools/perf/Makefile.perf w/tools/perf/Makefile.perf index e8c9f77e9010..9026667ba8cc 100644 --- i/tools/perf/Makefile.perf +++ w/tools/perf/Makefile.perf @@ -894,7 +894,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): - $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) + $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) VERSION=$(VERSION) ### Cleaning rules