From 1d4d77179c1594f245e78b8f18fe21f91296cbe4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 28 Dec 2006 21:12:44 +0000 Subject: [PATCH] * Always set the prefix. svn path=/nixpkgs/trunk/; revision=7513 --- pkgs/stdenv/generic/setup.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 89a65af8749..2862854ecab 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -161,6 +161,18 @@ fi export TZ=UTC +# Set the prefix. This is generally $out, but it can be overriden, +# for instance if we just want to perform a test build/install to a +# temporary location and write a build report to $out. +if test -z "$prefix"; then + prefix="$out"; +fi + +if test "$useTempPrefix" = "1"; then + prefix="$NIX_BUILD_TOP/tmp_prefix"; +fi + + # Execute the post-hook. if test -n "@postHook@"; then source @postHook@ @@ -521,14 +533,6 @@ configureW() { eval "$preConfigure" - if test -z "$prefix"; then - prefix="$out"; - fi - - if test "$useTempPrefix" = "1"; then - prefix="$NIX_BUILD_TOP/tmp_prefix"; - fi - if test -z "$configureScript"; then configureScript=./configure if ! test -x $configureScript; then