2013-07-02 04:51:08 +00:00
|
|
|
From: Bastian Blank <waldi@debian.org>
|
|
|
|
Date: Mon, 26 Sep 2011 13:53:12 +0100
|
|
|
|
Subject: Create manpages and binaries including the version
|
|
|
|
Forwarded: no
|
|
|
|
|
|
|
|
[bwh: Fix version insertion in perf man page cross-references and perf
|
|
|
|
man page title. Install bash_completion script for perf with a
|
2015-05-11 02:19:32 +00:00
|
|
|
version-dependent name. And do the same for trace.]
|
2013-07-02 04:51:08 +00:00
|
|
|
|
2019-10-25 20:57:23 +00:00
|
|
|
Index: linux/tools/perf/Makefile.perf
|
|
|
|
===================================================================
|
|
|
|
--- linux.orig/tools/perf/Makefile.perf
|
|
|
|
+++ linux/tools/perf/Makefile.perf
|
2018-09-16 22:10:56 +00:00
|
|
|
@@ -759,23 +759,23 @@ endif
|
2015-08-13 18:52:14 +00:00
|
|
|
install-tools: all install-gtk
|
2014-01-21 05:53:15 +00:00
|
|
|
$(call QUIET_INSTALL, binaries) \
|
|
|
|
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \
|
|
|
|
- $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'; \
|
|
|
|
- $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace'
|
|
|
|
+ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)'; \
|
|
|
|
+ $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)'
|
2015-05-11 02:51:07 +00:00
|
|
|
+ $(call QUIET_INSTALL, libexec) \
|
|
|
|
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
|
2015-05-10 23:51:13 +00:00
|
|
|
ifndef NO_PERF_READ_VDSO32
|
|
|
|
$(call QUIET_INSTALL, perf-read-vdso32) \
|
2015-05-11 02:51:07 +00:00
|
|
|
- $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)';
|
|
|
|
+ $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)';
|
|
|
|
endif
|
|
|
|
ifndef NO_PERF_READ_VDSOX32
|
|
|
|
$(call QUIET_INSTALL, perf-read-vdsox32) \
|
|
|
|
- $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)';
|
|
|
|
+ $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)';
|
|
|
|
endif
|
2017-01-24 19:25:08 +00:00
|
|
|
ifndef NO_JVMTI
|
|
|
|
$(call QUIET_INSTALL, $(LIBJVMTI)) \
|
2017-04-19 09:30:57 +00:00
|
|
|
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \
|
2017-01-24 19:25:08 +00:00
|
|
|
$(INSTALL) $(OUTPUT)$(LIBJVMTI) '$(DESTDIR_SQ)$(libdir_SQ)';
|
|
|
|
endif
|
2015-05-11 02:51:07 +00:00
|
|
|
- $(call QUIET_INSTALL, libexec) \
|
|
|
|
- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
|
2018-06-26 01:38:11 +00:00
|
|
|
ifndef NO_LIBBPF
|
2018-09-16 22:10:56 +00:00
|
|
|
$(call QUIET_INSTALL, bpf-headers) \
|
|
|
|
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perf_include_instdir_SQ)/bpf'; \
|
|
|
|
@@ -811,7 +811,7 @@ ifndef NO_LIBPYTHON
|
2013-11-21 01:27:40 +00:00
|
|
|
endif
|
2014-03-09 17:38:51 +00:00
|
|
|
$(call QUIET_INSTALL, perf_completion-script) \
|
2014-01-21 05:53:15 +00:00
|
|
|
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \
|
2014-03-09 17:38:51 +00:00
|
|
|
- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf'
|
|
|
|
+ $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)'
|
2016-02-18 03:19:23 +00:00
|
|
|
$(call QUIET_INSTALL, perf-tip) \
|
|
|
|
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \
|
|
|
|
$(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)'
|
2018-09-16 22:10:56 +00:00
|
|
|
@@ -836,7 +836,7 @@ install-python_ext:
|
2011-09-26 12:53:12 +00:00
|
|
|
|
2013-02-24 05:15:41 +00:00
|
|
|
# '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
|
2011-09-26 12:53:12 +00:00
|
|
|
|
2019-10-25 20:57:23 +00:00
|
|
|
Index: linux/tools/perf/Documentation/Makefile
|
|
|
|
===================================================================
|
|
|
|
--- linux.orig/tools/perf/Documentation/Makefile
|
|
|
|
+++ linux/tools/perf/Documentation/Makefile
|
2018-06-26 01:38:11 +00:00
|
|
|
@@ -194,14 +194,16 @@ ifdef missing_tools
|
2013-02-24 05:15:41 +00:00
|
|
|
$(error "You need to install $(missing_tools) for man pages")
|
|
|
|
endif
|
2011-09-26 12:53:12 +00:00
|
|
|
|
2013-02-24 05:15:41 +00:00
|
|
|
-do-install-man: man
|
|
|
|
+do-install-man: $(addprefix install-man-,$(_DOC_MAN1))
|
2011-09-26 12:53:12 +00:00
|
|
|
+
|
2012-06-09 18:54:23 +00:00
|
|
|
+install-man-perf.1: $(OUTPUT)perf.1
|
2011-09-26 12:53:12 +00:00
|
|
|
+ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
|
2012-06-09 19:18:46 +00:00
|
|
|
+ sed -e 's/"PERF"/"PERF_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1
|
2011-09-26 12:53:12 +00:00
|
|
|
+
|
2012-06-09 18:54:23 +00:00
|
|
|
+install-man-perf%.1: $(OUTPUT)perf%.1
|
2014-01-21 05:53:15 +00:00
|
|
|
$(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
|
2011-09-26 12:53:12 +00:00
|
|
|
|
2017-10-01 19:26:01 +00:00
|
|
|
install-man: check-man-tools man do-install-man
|
2013-02-24 05:15:41 +00:00
|
|
|
|
2019-10-25 20:57:23 +00:00
|
|
|
Index: linux/tools/perf/util/Build
|
|
|
|
===================================================================
|
|
|
|
--- linux.orig/tools/perf/util/Build
|
|
|
|
+++ linux/tools/perf/util/Build
|
2018-09-16 22:10:56 +00:00
|
|
|
@@ -193,6 +193,7 @@ CFLAGS_libstring.o += -Wno-unused-pa
|
2015-07-12 23:58:02 +00:00
|
|
|
CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
|
|
|
|
CFLAGS_parse-events.o += -Wno-redundant-decls
|
2017-04-19 09:30:57 +00:00
|
|
|
CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
|
2015-07-12 23:58:02 +00:00
|
|
|
+CFLAGS_vdso.o += -DPERFEXECDIR='"$(perfexec_instdir_SQ)"'
|
|
|
|
|
|
|
|
$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
|
|
|
|
$(call rule_mkdir)
|
2019-10-25 20:57:23 +00:00
|
|
|
Index: linux/tools/perf/util/vdso.c
|
|
|
|
===================================================================
|
|
|
|
--- linux.orig/tools/perf/util/vdso.c
|
|
|
|
+++ linux/tools/perf/util/vdso.c
|
2018-06-26 01:38:11 +00:00
|
|
|
@@ -52,12 +52,12 @@ static struct vdso_info *vdso_info__new(
|
2015-05-11 02:51:07 +00:00
|
|
|
.vdso32 = {
|
|
|
|
.temp_file_name = VDSO__TEMP_FILE_NAME,
|
|
|
|
.dso_name = DSO__NAME_VDSO32,
|
|
|
|
- .read_prog = "perf-read-vdso32",
|
|
|
|
+ .read_prog = PERFEXECDIR "/perf-read-vdso32",
|
|
|
|
},
|
|
|
|
.vdsox32 = {
|
|
|
|
.temp_file_name = VDSO__TEMP_FILE_NAME,
|
|
|
|
.dso_name = DSO__NAME_VDSOX32,
|
|
|
|
- .read_prog = "perf-read-vdsox32",
|
|
|
|
+ .read_prog = PERFEXECDIR "/perf-read-vdsox32",
|
|
|
|
},
|
|
|
|
#endif
|
|
|
|
};
|