stdenv: don't fail installPhase on missing makefile

otherwise the build just fails with 'make: *** No rule to make target 'install'.  Stop.'

and update buildPhase message

i don't know if the 'makefile may have been created in buildPhase' is
true but i guess it might be possible
This commit is contained in:
Artturin 2023-01-06 01:48:11 +02:00
parent b18eedcdab
commit 314b03125f

View File

@ -1253,7 +1253,7 @@ buildPhase() {
runHook preBuild
if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
echo "no Makefile, doing nothing"
echo "no Makefile or custom buildPhase, doing nothing"
else
foundMakefile=1
@ -1323,6 +1323,15 @@ checkPhase() {
installPhase() {
runHook preInstall
# Dont reuse 'foundMakefile' set in buildPhase, a makefile may have been created in buildPhase
if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
echo "no Makefile or custom installPhase, doing nothing"
runHook postInstall
return
else
foundMakefile=1
fi
if [ -n "$prefix" ]; then
mkdir -p "$prefix"
fi