From e05bb0fceae1a6f73d03cbcbc929ca25aad2479a Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 25 Dec 2022 09:56:42 +0800 Subject: improve configure --- configure | 15 ++++++++++++--- 1 file 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 -- cgit v1.3.1