diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2013-12-11 11:58:54 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2013-12-11 11:58:54 +0100 |
| commit | d862bf0fe92d62458a80eceecfa864164dd27cd5 (patch) | |
| tree | 6419fe906ed709e2c952e74c85f321aaff198956 | |
| parent | 68ad877c6becd2e99ebc909e942d082bbd6efe94 (diff) | |
build: Remove '..' from srcdir/builddir in 'pre-inst-env'.
* pre-inst-env.in (abs_top_srcdir, abs_top_builddir): New variables.
Use them instead of @abs_top_srcdir@ and @abs_top_builddir@.
This fixes the "package-field-location, relative file name" test in
'make distcheck'.
| -rw-r--r-- | pre-inst-env.in | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/pre-inst-env.in b/pre-inst-env.in index 5e7758cd7c1..acdce611683 100644 --- a/pre-inst-env.in +++ b/pre-inst-env.in | |||
| @@ -23,20 +23,27 @@ | |||
| 23 | # Run COMMAND in a pre-installation environment. Typical use is | 23 | # Run COMMAND in a pre-installation environment. Typical use is |
| 24 | # "./pre-inst-env guix-build hello". | 24 | # "./pre-inst-env guix-build hello". |
| 25 | 25 | ||
| 26 | GUILE_LOAD_COMPILED_PATH="@abs_top_builddir@${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" | 26 | # By default we may end up with absolute directory names that contain '..', |
| 27 | GUILE_LOAD_PATH="@abs_top_builddir@:@abs_top_srcdir@${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH" | 27 | # which get into $GUILE_LOAD_PATH, leading to '..' in the module file names |
| 28 | # recorded by Guile. To avoid that, make sure we get a real absolute | ||
| 29 | # directory name. | ||
| 30 | abs_top_srcdir="`cd "@abs_top_srcdir@" > /dev/null; pwd`" | ||
| 31 | abs_top_builddir="`cd "@abs_top_builddir@" > /dev/null; pwd`" | ||
| 32 | |||
| 33 | GUILE_LOAD_COMPILED_PATH="$abs_top_builddir${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" | ||
| 34 | GUILE_LOAD_PATH="$abs_top_builddir:$abs_top_srcdir${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH" | ||
| 28 | export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH | 35 | export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH |
| 29 | 36 | ||
| 30 | # Define $PATH so that `guix' and friends are easily found. | 37 | # Define $PATH so that `guix' and friends are easily found. |
| 31 | 38 | ||
| 32 | PATH="@abs_top_builddir@/scripts:@abs_top_builddir@:$PATH" | 39 | PATH="$abs_top_builddir/scripts:$abs_top_builddir:$PATH" |
| 33 | export PATH | 40 | export PATH |
| 34 | 41 | ||
| 35 | # Daemon helpers. | 42 | # Daemon helpers. |
| 36 | 43 | ||
| 37 | NIX_ROOT_FINDER="@abs_top_builddir@/nix/scripts/list-runtime-roots" | 44 | NIX_ROOT_FINDER="$abs_top_builddir/nix/scripts/list-runtime-roots" |
| 38 | NIX_SUBSTITUTERS="@abs_top_builddir@/nix/scripts/substitute-binary" | 45 | NIX_SUBSTITUTERS="$abs_top_builddir/nix/scripts/substitute-binary" |
| 39 | NIX_SETUID_HELPER="@abs_top_builddir@/nix-setuid-helper" | 46 | NIX_SETUID_HELPER="$abs_top_builddir/nix-setuid-helper" |
| 40 | export NIX_ROOT_FINDER NIX_SETUID_HELPER NIX_SUBSTITUTERS | 47 | export NIX_ROOT_FINDER NIX_SETUID_HELPER NIX_SUBSTITUTERS |
| 41 | 48 | ||
| 42 | # The following variables need only be defined when compiling Guix | 49 | # The following variables need only be defined when compiling Guix |
