Skip to content

Commit

Permalink
git: apply config.prefix to paths
Browse files Browse the repository at this point in the history
from @michaelforney:
> It looks like all of those paths (`GIT_*_PATH`, `DEFAULT_GIT_TEMPLATE_DIR`)
> are used with the `system_path()` function, which prefixes them
> with `system_prefix()`.
>
> `system_prefix()` works in one of two ways, depending on whether
> RUNTIME_PREFIX is defined. If it is, it looks of the executable
> path using `/proc/self/exe`, finding the prefix dynamically similar
> to a relocatable gcc toolchain, otherwise it uses
> `FALLBACK_RUNTIME_PREFIX`.

see #15: Support configurable PREFIX
  • Loading branch information
rnpnr committed Oct 4, 2023
1 parent 07cb5a5 commit 162cded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/git/gen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build('hooklist', '$outdir/hook-list.h', {
'|', '$srcdir/generate-hooklist.sh', '$srcdir/Documentation/githooks.txt'
})

cc('exec-cmd.c', nil, {cflags=[[$cflags '-DFALLBACK_RUNTIME_PREFIX=""']]})
cc('exec-cmd.c', nil, {cflags=string.format([[$cflags '-DFALLBACK_RUNTIME_PREFIX="%s"']], config.prefix)})
cc('common-main.c')
cc('http.c')
cc('compat/regex/regex.c', nil, {cflags='$cflags -DGAWK -DNO_MBSUPPORT'})
Expand Down

0 comments on commit 162cded

Please sign in to comment.