stdenv/setup.sh: don't skip post-hooks (close #12032)
So far if no configure script is found or no makefile, the rest of the phase is skipped, *including* post-hooks. I find that behavior unexpected/unintuitive. Earlier version of this patch had problems due to me assuming that $configureScript is always a simple path, but that turned out to be false in many cases, e.g. perl.
This commit is contained in:
parent
b6c06e216b
commit
1ebff73b88
@ -612,12 +612,8 @@ fixLibtool() {
|
|||||||
configurePhase() {
|
configurePhase() {
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
|
|
||||||
if [ -z "$configureScript" ]; then
|
if [ -z "$configureScript" -a -x ./configure ]; then
|
||||||
configureScript=./configure
|
configureScript=./configure
|
||||||
if ! [ -x $configureScript ]; then
|
|
||||||
echo "no configure script, doing nothing"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$dontFixLibtool" ]; then
|
if [ -z "$dontFixLibtool" ]; then
|
||||||
@ -645,8 +641,12 @@ configurePhase() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "configure flags: $configureFlags ${configureFlagsArray[@]}"
|
if [ -n "$configureScript" ]; then
|
||||||
$configureScript $configureFlags "${configureFlagsArray[@]}"
|
echo "configure flags: $configureFlags ${configureFlagsArray[@]}"
|
||||||
|
$configureScript $configureFlags "${configureFlagsArray[@]}"
|
||||||
|
else
|
||||||
|
echo "no configure script, doing nothing"
|
||||||
|
fi
|
||||||
|
|
||||||
runHook postConfigure
|
runHook postConfigure
|
||||||
}
|
}
|
||||||
@ -657,18 +657,17 @@ buildPhase() {
|
|||||||
|
|
||||||
if [ -z "$makeFlags" ] && ! [ -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile" ]; then
|
if [ -z "$makeFlags" ] && ! [ -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile" ]; then
|
||||||
echo "no Makefile, doing nothing"
|
echo "no Makefile, doing nothing"
|
||||||
return
|
else
|
||||||
|
# See https://github.com/NixOS/nixpkgs/pull/1354#issuecomment-31260409
|
||||||
|
makeFlags="SHELL=$SHELL $makeFlags"
|
||||||
|
|
||||||
|
echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}"
|
||||||
|
make ${makefile:+-f $makefile} \
|
||||||
|
${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} \
|
||||||
|
$makeFlags "${makeFlagsArray[@]}" \
|
||||||
|
$buildFlags "${buildFlagsArray[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# See https://github.com/NixOS/nixpkgs/pull/1354#issuecomment-31260409
|
|
||||||
makeFlags="SHELL=$SHELL $makeFlags"
|
|
||||||
|
|
||||||
echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}"
|
|
||||||
make ${makefile:+-f $makefile} \
|
|
||||||
${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} \
|
|
||||||
$makeFlags "${makeFlagsArray[@]}" \
|
|
||||||
$buildFlags "${buildFlagsArray[@]}"
|
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user