diff options
| -rw-r--r-- | Documentation/Makefile | 20 | ||||
| -rw-r--r-- | Makefile | 11 | ||||
| -rw-r--r-- | kernel-shark.c | 5 |
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 | ||
| 88 | install: $(MAN1_INSTALL) $(MAN5_INSTALL) | 88 | html_dir = $(src)/HTML |
| 89 | image_dir = $(html_dir)/images | ||
| 90 | |||
| 91 | HTML = $(wildcard $(html_dir)/*.html) | ||
| 92 | IMGS = $(wildcard $(image_dir)/*.png) | ||
| 93 | |||
| 94 | HTML_INSTALL = $(subst .html,.html.install,$(HTML)) | ||
| 95 | IMGS_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 | |||
| 104 | GUI_INSTALL = $(HTML_INSTALL) $(IMGS_INSTALL) | ||
| 105 | |||
| 106 | install: $(MAN1_INSTALL) $(MAN5_INSTALL) $(GUI_INSTALL) | ||
| 89 | 107 | ||
| 90 | clean: | 108 | clean: |
| 91 | (cd $(obj); \ | 109 | (cd $(obj); \ |
| @@ -23,8 +23,13 @@ bindir_relative = bin | |||
| 23 | bindir = $(prefix)/$(bindir_relative) | 23 | bindir = $(prefix)/$(bindir_relative) |
| 24 | man_dir = $(prefix)/share/man | 24 | man_dir = $(prefix)/share/man |
| 25 | man_dir_SQ = '$(subst ','\'',$(man_dir))' | 25 | man_dir_SQ = '$(subst ','\'',$(man_dir))' |
| 26 | html_install = $(prefix)/share/kernelshark/html | ||
| 27 | html_install_SQ = '$(subst ','\'',$(html_install))' | ||
| 28 | img_install = $(prefix)/share/kernelshark/html/images | ||
| 29 | img_install_SQ = '$(subst ','\'',$(img_install))' | ||
| 26 | 30 | ||
| 27 | export man_dir man_dir_SQ INSTALL | 31 | export man_dir man_dir_SQ html_install html_install_SQ INSTALL |
| 32 | export img_install img_install_SQ | ||
| 28 | 33 | ||
| 29 | ifeq ($(prefix),$(HOME)) | 34 | ifeq ($(prefix),$(HOME)) |
| 30 | plugin_dir = $(HOME)/.trace-cmd/plugins | 35 | plugin_dir = $(HOME)/.trace-cmd/plugins |
| @@ -34,6 +39,9 @@ PLUGIN_DIR = -DPLUGIN_DIR=$(plugin_dir) | |||
| 34 | PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))' | 39 | PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))' |
| 35 | endif | 40 | endif |
| 36 | 41 | ||
| 42 | HELP_DIR = -DHELP_DIR=$(html_install) | ||
| 43 | HELP_DIR_SQ = '$(subst ','\'',$(HELP_DIR))' | ||
| 44 | |||
| 37 | # copy a bit from Linux kbuild | 45 | # copy a bit from Linux kbuild |
| 38 | 46 | ||
| 39 | ifeq ("$(origin V)", "command line") | 47 | ifeq ("$(origin V)", "command line") |
| @@ -124,6 +132,7 @@ REBUILD_GUI = /bin/true | |||
| 124 | G = | 132 | G = |
| 125 | N = @/bin/true || | 133 | N = @/bin/true || |
| 126 | 134 | ||
| 135 | CONFIG_FLAGS += $(HELP_DIR_SQ) | ||
| 127 | else | 136 | else |
| 128 | 137 | ||
| 129 | CONFIG_INCLUDES = | 138 | CONFIG_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 | } |
