diff options
| -rwxr-xr-x | configure | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -3715,18 +3715,19 @@ _gmake_add_switches() { echo "INSTALLDIR:=\$(DESTDIR)" >> "${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}" echo "ifneq (\$(PREFIX),)" >> "${xmake_sh_makefile}" echo "ifneq (\$(INSTALLDIR),)" >> "${xmake_sh_makefile}" - echo "INSTALLDIR:=\$(INSTALLDIR)/\$(PREFIX)" >> "${xmake_sh_makefile}" + echo "PREFIX_:=\$(patsubst /%,%,\$(PREFIX))" >> "${xmake_sh_makefile}" + echo "INSTALLDIR:=\$(INSTALLDIR)/\$(PREFIX_)" >> "${xmake_sh_makefile}" echo "else" >> "${xmake_sh_makefile}" echo "INSTALLDIR:=\$(PREFIX)" >> "${xmake_sh_makefile}" echo "endif" >> "${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}" } _gmake_add_flags() { @@ -3957,10 +3958,12 @@ _gmake_add_install_target() { _get_target_item "${target}" "kind"; local targetkind="${_ret}" if test_eq "${targetkind}" "binary"; then string_replace "${_install_bindir_default}" "\${prefix}" "${installdir}"; _install_bindir_default="${_ret}" + print "\t@echo installing ${targetfile} to ${_install_bindir_default}" >> "${xmake_sh_makefile}" print "\t@mkdir -p ${_install_bindir_default}" >> "${xmake_sh_makefile}" print "\t@cp -p ${targetfile} ${_install_bindir_default}/${filename}" >> "${xmake_sh_makefile}" elif test_eq "${targetkind}" "static" || test_eq "${targetkind}" "shared"; then string_replace "${_install_libdir_default}" "\${prefix}" "${installdir}"; _install_libdir_default="${_ret}" + print "\t@echo installing ${targetfile} to ${_install_libdir_default}" >> "${xmake_sh_makefile}" print "\t@mkdir -p ${_install_libdir_default}" >> "${xmake_sh_makefile}" print "\t@cp -p ${targetfile} ${_install_libdir_default}/${filename}" >> "${xmake_sh_makefile}" fi |
