summaryrefslogtreecommitdiff
path: root/builtin-help.c
diff options
context:
space:
mode:
authorLibravatar Steffen Prohaska <prohaska@zib.de>2009-01-18 13:00:09 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-26 00:26:05 -0800
commit026fa0d5ad9538ca76838070861531c037d7b9ba (patch)
tree62b19e4750f7e3fc44f93385f758b6a7b3ec2d6c /builtin-help.c
parentt7700: demonstrate misbehavior of 'repack -a' when local packs exist (diff)
downloadtgif-026fa0d5ad9538ca76838070861531c037d7b9ba.tar.xz
Move computation of absolute paths from Makefile to runtime (in preparation for RUNTIME_PREFIX)
This commit prepares the Makefile for relocatable binaries (called RUNTIME_PREFIX). Such binaries will be able to be moved together with the system configuration files to a different directory, requiring to compute the prefix at runtime. In a first step, we make all paths relative in the Makefile and teach system_path() to add the prefix instead. We used to compute absolute paths in the Makefile and passed them to C as defines. We now pass relative paths to C and call system_path() to add the prefix at runtime. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-help.c')
-rw-r--r--builtin-help.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-help.c b/builtin-help.c
index f076efa921..9b57a74618 100644
--- a/builtin-help.c
+++ b/builtin-help.c
@@ -329,7 +329,7 @@ static void setup_man_path(void)
* old_path, the ':' at the end will let 'man' to try
* system-wide paths after ours to find the manual page. If
* there is old_path, we need ':' as delimiter. */
- strbuf_addstr(&new_path, GIT_MAN_PATH);
+ strbuf_addstr(&new_path, system_path(GIT_MAN_PATH));
strbuf_addch(&new_path, ':');
if (old_path)
strbuf_addstr(&new_path, old_path);
@@ -375,7 +375,7 @@ static void show_man_page(const char *git_cmd)
static void show_info_page(const char *git_cmd)
{
const char *page = cmd_to_page(git_cmd);
- setenv("INFOPATH", GIT_INFO_PATH, 1);
+ setenv("INFOPATH", system_path(GIT_INFO_PATH), 1);
execlp("info", "info", "gitman", page, NULL);
}