浏览代码

improve prefix

ruki 2 年之前
父节点
当前提交
d8884ca620
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      configure

+ 5 - 1
configure

@@ -3535,6 +3535,10 @@ _gmake_add_switches() {
     echo "V=@" >> "${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 "endif" >> "${xmake_sh_makefile}"
+    echo "" >> "${xmake_sh_makefile}"
 }
 
 _gmake_add_flags() {
@@ -3758,7 +3762,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=${_install_prefix_default}
+        installdir="\$(PREFIX)"
     fi
 
     # install target file