]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Install dhat viewer files in libexec.
authorMark Wielaard <mark@klomp.org>
Sun, 7 Apr 2019 21:59:54 +0000 (23:59 +0200)
committerMark Wielaard <mark@klomp.org>
Sun, 7 Apr 2019 22:02:21 +0000 (00:02 +0200)
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.

dhat/Makefile.am
dhat/dh_main.c

index e8ddb05164bdd7a7bce9a38bcaaad5af2ff552ed..2aa4ac99e03a2d368c3eaea7d0257317d4f6e3d6 100644 (file)
@@ -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@)
index ece2eed77105804e98aad7da3a6f237cc8f00267..47a9327bd78c3597738f63c8a5fff227d877591b 100644 (file)
@@ -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);