mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
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() {
|
||||
runHook preConfigure
|
||||
|
||||
if [ -z "$configureScript" ]; then
|
||||
if [ -z "$configureScript" -a -x ./configure ]; then
|
||||
configureScript=./configure
|
||||
if ! [ -x $configureScript ]; then
|
||||
echo "no configure script, doing nothing"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$dontFixLibtool" ]; then
|
||||
@ -645,8 +641,12 @@ configurePhase() {
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "configure flags: $configureFlags ${configureFlagsArray[@]}"
|
||||
$configureScript $configureFlags "${configureFlagsArray[@]}"
|
||||
if [ -n "$configureScript" ]; then
|
||||
echo "configure flags: $configureFlags ${configureFlagsArray[@]}"
|
||||
$configureScript $configureFlags "${configureFlagsArray[@]}"
|
||||
else
|
||||
echo "no configure script, doing nothing"
|
||||
fi
|
||||
|
||||
runHook postConfigure
|
||||
}
|
||||
@ -657,18 +657,17 @@ buildPhase() {
|
||||
|
||||
if [ -z "$makeFlags" ] && ! [ -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile" ]; then
|
||||
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
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user