From 719f100491711d39fb805f5a7c410a84753f6e14 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 22 Aug 2013 18:02:19 +0200 Subject: [PATCH] Don't assume that there is an "out" output --- pkgs/stdenv/generic/setup.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 0c1e3e73680..c2475d06013 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -236,11 +236,11 @@ export TZ=UTC # for instance if we just want to perform a test build/install to a # temporary location and write a build report to $out. if [ -z "$prefix" ]; then - prefix="$out"; + prefix="$out" fi if [ "$useTempPrefix" = 1 ]; then - prefix="$NIX_BUILD_TOP/tmp_prefix"; + prefix="$NIX_BUILD_TOP/tmp_prefix" fi @@ -608,7 +608,7 @@ configurePhase() { fi fi - if [ -z "$dontAddPrefix" ]; then + if [ -z "$dontAddPrefix" -a -n "$prefix" ]; then configureFlags="${prefixKey:---prefix=}$prefix $configureFlags" fi @@ -702,7 +702,9 @@ patchShebangs() { installPhase() { runHook preInstall - mkdir -p "$prefix" + if [ -n "$prefix" ]; then + mkdir -p "$prefix" + fi installTargets=${installTargets:-install} echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" @@ -721,7 +723,7 @@ fixupPhase() { runHook preFixup # Move $out/share{doc,gtk-doc} to the "doc" output, if defined. - if [ -n "$doc" -a "${autoMoveDocs-1}" ]; then + if [ -n "$doc" -a -n "$out" -a "${autoMoveDocs-1}" ]; then for i in share/doc share/gtk-doc; do if [ -e $out/$i ]; then mkdir -p $doc/$i