|
From: Mark W. <ma...@so...> - 2019-04-07 22:11:09
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=8a97bdbb1bdeebbc68e30934ed4f5f002b434039 commit 8a97bdbb1bdeebbc68e30934ed4f5f002b434039 Author: Mark Wielaard <ma...@kl...> Date: Sun Apr 7 23:59:54 2019 +0200 Install dhat viewer files in libexec. libexec seems a better location than libdir. libexec is for internal binaries or scripts that are not intended to be executed directly. If we want to change the location again it is now simple. Just change the dhat/Makefile.am dhatdir variable. Diff: --- dhat/Makefile.am | 10 +++++----- dhat/dh_main.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dhat/Makefile.am b/dhat/Makefile.am index e8ddb05..2aa4ac9 100644 --- a/dhat/Makefile.am +++ b/dhat/Makefile.am @@ -8,11 +8,9 @@ EXTRA_DIST = docs/dh-manual.xml dh_view.html dh_view.css dh_view.js # Headers, etc #---------------------------------------------------------------------------- -# Ensure the viewer components get copied into the install tree. Note that -# vglibdir and vglib_DATA are also defined in coregrind/Makefile.am. I don't -# know if that's a problem. Doesn't appear to be. -vglibdir = $(pkglibdir) -vglib_DATA = dh_view.html dh_view.css dh_view.js +# Ensure the viewer components get copied into the install tree. +dhatdir = $(pkglibexecdir) +dhat_DATA = dh_view.html dh_view.css dh_view.js #---------------------------------------------------------------------------- # dhat-<platform> @@ -30,6 +28,7 @@ dhat_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = \ dhat_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = \ $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) dhat_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(LTO_CFLAGS) \ + -DDHAT_VIEW_DIR=\"$(dhatdir)\" \ $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) dhat_@VGCONF_ARCH_PRI@_@VGCONF_OS@_DEPENDENCIES = \ $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@) @@ -50,6 +49,7 @@ dhat_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = \ dhat_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = \ $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) dhat_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(LTO_CFLAGS) \ + -DDHAT_VIEW_DIR=\"$(dhatdir)\" \ $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) dhat_@VGCONF_ARCH_SEC@_@VGCONF_OS@_DEPENDENCIES = \ $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@) diff --git a/dhat/dh_main.c b/dhat/dh_main.c index ece2eed..47a9327 100644 --- a/dhat/dh_main.c +++ b/dhat/dh_main.c @@ -1445,7 +1445,7 @@ static void dh_fini(Int exit_status) // Print a how-to-view-the-profile hint. VG_(umsg)("\n"); VG_(umsg)("To view the resulting profile, open\n"); - VG_(umsg)(" file://%s/%s\n", VG_(libdir), "dh_view.html"); + VG_(umsg)(" file://%s/%s\n", DHAT_VIEW_DIR, "dh_view.html"); VG_(umsg)("in a web browser, click on \"Load...\" " "and then select the file\n"); VG_(umsg)(" %s\n", dhat_out_file); |