Merge pull request #209255 from Artturin/stdenvupdate1

stdenv: don't fail installPhase on missing makefile
This commit is contained in:
Artturi 2023-01-10 03:48:17 +02:00 committed by GitHub
commit 386f2bb148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View File

@ -6,8 +6,8 @@ postFixupHooks+=(_makeSymlinksRelative)
_makeSymlinksRelative() {
local symlinkTarget
if [ -n "${dontRewriteSymlinks-}" ]; then
return 0
if [ "${dontRewriteSymlinks-}" ] || [ ! -e "$prefix" ]; then
return
fi
while IFS= read -r -d $'\0' f; do

View File

@ -36,7 +36,7 @@ _doStrip() {
local -n ranlibCmd="${ranlibCmds[$i]}"
# `dontStrip` disables them all
if [[ "${dontStrip-}" || "${flag-}" ]] || ! type -f "${stripCmd-}" 2>/dev/null
if [[ "${dontStrip-}" || "${flag-}" ]] || ! type -f "${stripCmd-}" 2>/dev/null 1>&2
then continue; fi
stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S}"

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