diff options
| author | ruki <[email protected]> | 2023-01-18 23:03:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-01-18 23:03:03 +0800 |
| commit | eb0f27e5b335f45e903754d74a727943913e04c2 (patch) | |
| tree | 0d5b3a648b541adf548d70bea920bce9028876b5 | |
| parent | 20f135e26e3597b8cc4fc2061207f94e98a5f006 (diff) | |
update configure
| -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 |
