aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/Makefile20
-rw-r--r--Makefile11
-rw-r--r--kernel-shark.c5
3 files changed, 33 insertions, 3 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 7ed8877..8e53773 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -85,7 +85,25 @@ $(MAN1_INSTALL): %.1.install : %.1 force
85$(MAN5_INSTALL): %.5.install : %.5 force 85$(MAN5_INSTALL): %.5.install : %.5 force
86 $(Q)$(call do_install, $<, '$(man_dir_SQ)/man5') 86 $(Q)$(call do_install, $<, '$(man_dir_SQ)/man5')
87 87
88install: $(MAN1_INSTALL) $(MAN5_INSTALL) 88html_dir = $(src)/HTML
89image_dir = $(html_dir)/images
90
91HTML = $(wildcard $(html_dir)/*.html)
92IMGS = $(wildcard $(image_dir)/*.png)
93
94HTML_INSTALL = $(subst .html,.html.install,$(HTML))
95IMGS_INSTALL = $(subst .png,.png.install,$(IMGS))
96
97$(HTML_INSTALL): %.html.install : %.html force
98 $(Q)$(call do_install, $<, '$(html_install_SQ)')
99
100$(IMGS_INSTALL): %.png.install : %.png force
101 $(Q)$(call do_install, $<, '$(img_install_SQ)')
102
103
104GUI_INSTALL = $(HTML_INSTALL) $(IMGS_INSTALL)
105
106install: $(MAN1_INSTALL) $(MAN5_INSTALL) $(GUI_INSTALL)
89 107
90clean: 108clean:
91 (cd $(obj); \ 109 (cd $(obj); \
diff --git a/Makefile b/Makefile
index 7dde5cf..cded750 100644
--- a/Makefile
+++ b/Makefile
@@ -23,8 +23,13 @@ bindir_relative = bin
23bindir = $(prefix)/$(bindir_relative) 23bindir = $(prefix)/$(bindir_relative)
24man_dir = $(prefix)/share/man 24man_dir = $(prefix)/share/man
25man_dir_SQ = '$(subst ','\'',$(man_dir))' 25man_dir_SQ = '$(subst ','\'',$(man_dir))'
26html_install = $(prefix)/share/kernelshark/html
27html_install_SQ = '$(subst ','\'',$(html_install))'
28img_install = $(prefix)/share/kernelshark/html/images
29img_install_SQ = '$(subst ','\'',$(img_install))'
26 30
27export man_dir man_dir_SQ INSTALL 31export man_dir man_dir_SQ html_install html_install_SQ INSTALL
32export img_install img_install_SQ
28 33
29ifeq ($(prefix),$(HOME)) 34ifeq ($(prefix),$(HOME))
30plugin_dir = $(HOME)/.trace-cmd/plugins 35plugin_dir = $(HOME)/.trace-cmd/plugins
@@ -34,6 +39,9 @@ PLUGIN_DIR = -DPLUGIN_DIR=$(plugin_dir)
34PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))' 39PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
35endif 40endif
36 41
42HELP_DIR = -DHELP_DIR=$(html_install)
43HELP_DIR_SQ = '$(subst ','\'',$(HELP_DIR))'
44
37# copy a bit from Linux kbuild 45# copy a bit from Linux kbuild
38 46
39ifeq ("$(origin V)", "command line") 47ifeq ("$(origin V)", "command line")
@@ -124,6 +132,7 @@ REBUILD_GUI = /bin/true
124G = 132G =
125N = @/bin/true || 133N = @/bin/true ||
126 134
135CONFIG_FLAGS += $(HELP_DIR_SQ)
127else 136else
128 137
129CONFIG_INCLUDES = 138CONFIG_INCLUDES =
diff --git a/kernel-shark.c b/kernel-shark.c
index ee47ff5..b056420 100644
--- a/kernel-shark.c
+++ b/kernel-shark.c
@@ -36,6 +36,9 @@
36#include "kernel-shark.h" 36#include "kernel-shark.h"
37#include "version.h" 37#include "version.h"
38 38
39#define ___stringify(X) #X
40#define __stringify(X) ___stringify(X)
41
39#define DEBUG_LEVEL 0 42#define DEBUG_LEVEL 0
40#if DEBUG_LEVEL > 0 43#if DEBUG_LEVEL > 0
41# define dprintf(l, x...) \ 44# define dprintf(l, x...) \
@@ -422,7 +425,7 @@ help_content_clicked (gpointer data)
422 GError *error = NULL; 425 GError *error = NULL;
423 gchar *link; 426 gchar *link;
424 427
425 link = "http://www.google.com"; 428 link = "file://" __stringify(HELP_DIR) "/index.html";
426 429
427 trace_show_help(info->window, link, &error); 430 trace_show_help(info->window, link, &error);
428} 431}