summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-12-25 09:56:42 +0800
committerruki <[email protected]>2022-12-25 09:56:42 +0800
commite05bb0fceae1a6f73d03cbcbc929ca25aad2479a (patch)
treea0dda63ffbde6f3dee729f14511c6a83cd7eb80e
parent038164b6056ec2fc521cdc796694282448c52995 (diff)
improve configure
-rwxr-xr-xconfigure15
1 files changed, 12 insertions, 3 deletions
diff --git a/configure b/configure
index 354bfda29..1621b58bb 100755
--- a/configure
+++ b/configure
@@ -3574,8 +3574,17 @@ _gmake_add_switches() {
echo "VV=@" >> "${xmake_sh_makefile}"
echo "endif" >> "${xmake_sh_makefile}"
echo "" >> "${xmake_sh_makefile}"
- echo "ifeq (\$(PREFIX),)" >> "${xmake_sh_makefile}"
- echo "PREFIX=${_install_prefix_default}" >> "${xmake_sh_makefile}"
+ echo "INSTALLDIR:=" >> "${xmake_sh_makefile}"
+ echo "ifneq (\$(DESTDIR),)" >> "${xmake_sh_makefile}"
+ echo "INSTALLDIR:=\$(DESTDIR)" >> "${xmake_sh_makefile}"
+ echo "endif" >> "${xmake_sh_makefile}"
+ echo "" >> "${xmake_sh_makefile}"
+ echo "ifneq (\$(PREFIX),)" >> "${xmake_sh_makefile}"
+ echo "INSTALLDIR:=\$(INSTALLDIR)/\$(PREFIX)" >> "${xmake_sh_makefile}"
+ echo "endif" >> "${xmake_sh_makefile}"
+ echo "" >> "${xmake_sh_makefile}"
+ echo "ifeq (\$(INSTALLDIR),)" >> "${xmake_sh_makefile}"
+ echo "INSTALLDIR=${_install_prefix_default}" >> "${xmake_sh_makefile}"
echo "endif" >> "${xmake_sh_makefile}"
echo "" >> "${xmake_sh_makefile}"
}
@@ -3801,7 +3810,7 @@ _gmake_add_install_target() {
path_filename "${targetfile}"; local filename="${_ret}"
_get_target_item "${target}" "installdir"; local installdir="${_ret}"
if test_z "${installdir}"; then
- installdir="\$(PREFIX)"
+ installdir="\$(INSTALLDIR)"
fi
# install target file