Automatically create stagedir if it is missing
Also don't treat a missing stagedir as an error when calling clean.
This commit is contained in:
parent
9430cf5c7e
commit
3aae9488ab
@ -448,8 +448,6 @@ clean()
|
|||||||
echo "Emptying $stagedir"
|
echo "Emptying $stagedir"
|
||||||
${__rm} -rf $stagedir # This is very dangerous!
|
${__rm} -rf $stagedir # This is very dangerous!
|
||||||
${__mkdir} $stagedir
|
${__mkdir} $stagedir
|
||||||
else
|
|
||||||
error $E_BAD_DIR clean
|
|
||||||
fi
|
fi
|
||||||
# Solaris only - We can't add this to meta since compver is usually created
|
# Solaris only - We can't add this to meta since compver is usually created
|
||||||
# during install
|
# during install
|
||||||
@ -867,14 +865,17 @@ generic_install()
|
|||||||
local dest="$stagedir"
|
local dest="$stagedir"
|
||||||
local destvar=DESTDIR
|
local destvar=DESTDIR
|
||||||
local arg1=${1-'x'}
|
local arg1=${1-'x'}
|
||||||
|
|
||||||
if [ "$arg1" != "x" ]; then
|
if [ "$arg1" != "x" ]; then
|
||||||
destvar=$arg1 # $1 was defined
|
destvar=$arg1 # $1 was defined
|
||||||
fi
|
fi
|
||||||
if [ "$custom_install" -eq 0 ]; then
|
if [ "$custom_install" -eq 0 ]; then
|
||||||
clean stage
|
clean stage
|
||||||
if [ "$shortroot" -eq 1 ]; then
|
[ "$shortroot" -eq 1 ] && dest="${stagedir}${prefix}"
|
||||||
dest="${stagedir}${prefix}"
|
# Create $dest if it is missing
|
||||||
${__mkdir} -p "$dest"
|
if [ ! -d $dest ]; then
|
||||||
|
echo "Creating $dest"
|
||||||
|
${__mkdir} -p $dest
|
||||||
fi
|
fi
|
||||||
setdir ${srcdir}/${topsrcdir}/$2
|
setdir ${srcdir}/${topsrcdir}/$2
|
||||||
${__make} $destvar=$dest install
|
${__make} $destvar=$dest install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user