diff options
| author | ruki <[email protected]> | 2025-04-24 22:45:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-24 22:45:25 +0800 |
| commit | e7c263a9dde105560699200fd52a0d786361655e (patch) | |
| tree | 2e7cd25e278b83947e59696571d4077b0d602cec | |
| parent | 21f74444f1d0dc5ee0f52ed08763dd18524429ad (diff) | |
rename buildir in xmake.sh
| -rwxr-xr-x | configure | 21 | ||||
| -rwxr-xr-x | core/src/cli/xmake.sh | 4 | ||||
| -rwxr-xr-x | core/src/xmake/xmake.sh | 4 |
3 files changed, 15 insertions, 14 deletions
@@ -23,7 +23,7 @@ # some constants # xmake_sh_projectdir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) -xmake_sh_buildir="build" +xmake_sh_builddir="build" xmake_sh_version="1.0.5" xmake_sh_verbose=false xmake_sh_diagnosis=false @@ -1499,7 +1499,7 @@ _get_targetdir() { local name="${1}" _get_target_item "${name}" "targetdir"; local targetdir="${_ret}" if test_z "${targetdir}"; then - targetdir="${xmake_sh_buildir}/${_target_plat}/${_target_arch}/${_target_mode}" + targetdir="${xmake_sh_builddir}/${_target_plat}/${_target_arch}/${_target_mode}" fi _ret="${targetdir}" } @@ -1509,7 +1509,7 @@ _get_target_objectdir() { local name="${1}" _get_target_item "${name}" "objectdir"; local objectdir="${_ret}" if test_z "${objectdir}"; then - objectdir="${xmake_sh_buildir}/.objs/${name}/${_target_plat}/${_target_arch}/${_target_mode}" + objectdir="${xmake_sh_builddir}/.objs/${name}/${_target_plat}/${_target_arch}/${_target_mode}" fi _ret="${objectdir}" } @@ -2786,7 +2786,7 @@ Common options: - emcc - tinycc - cosmocc - --buildir=DIR Set build directory. (default: '"${xmake_sh_buildir}"') + --builddir=DIR Set build directory. (default: '"${xmake_sh_builddir}"') Autoconf options: --build=BUILD Configure for building on BUILD [guessed] @@ -2882,8 +2882,8 @@ _handle_option() { elif test_eq "${name}" "includedir"; then _install_includedir_default="${value}" return 0 - elif test_eq "${name}" "buildir"; then - xmake_sh_buildir="${value}" + elif test_eq "${name}" "builddir" || test_eq "${name}" "buildir"; then + xmake_sh_builddir="${value}" return 0 elif test_eq "${name}" "build"; then _autoconf_build_type="${value}" @@ -3780,14 +3780,15 @@ _check_all() { _check_all #----------------------------------------------------------------------------- -# init builtin variables, e.g. add_headerfiles "${buildir}/config.h" +# init builtin variables, e.g. add_headerfiles "${builddir}/config.h" # projectdir="${xmake_sh_projectdir}" -if path_is_absolute "${xmake_sh_buildir}"; then - buildir="${xmake_sh_buildir}" +if path_is_absolute "${xmake_sh_builddir}"; then + builddir="${xmake_sh_builddir}" else - buildir="${xmake_sh_projectdir}/${xmake_sh_buildir}" + builddir="${xmake_sh_projectdir}/${xmake_sh_builddir}" fi +buildir=${builddir} # deprecated plat="${_target_plat}" arch="${_target_arch}" mode="${_target_mode}" diff --git a/core/src/cli/xmake.sh b/core/src/cli/xmake.sh index 845e14163..e2b388213 100755 --- a/core/src/cli/xmake.sh +++ b/core/src/cli/xmake.sh @@ -4,7 +4,7 @@ target "cli" add_deps "xmake" set_kind "binary" set_basename "xmake" - set_targetdir "${buildir}" + set_targetdir "${builddir}" # add definitions add_defines "__tb_prefix__=\"xmake\"" @@ -71,6 +71,6 @@ xmake_after_install() { print "\t@cp ${projectdir}/scripts/msys/xmake.sh ${installdir}/bin/xmake" >> "${xmake_sh_makefile}" print "\t@cp ${projectdir}/scripts/msys/xmake.cmd ${installdir}/bin/xmake.cmd" >> "${xmake_sh_makefile}" print "\t@cp ${projectdir}/scripts/msys/xmake.ps1 ${installdir}/bin/xmake.ps1" >> "${xmake_sh_makefile}" - print "\t@cp ${buildir}/xmake.exe ${installdir}/share/xmake" >> "${xmake_sh_makefile}" + print "\t@cp ${builddir}/xmake.exe ${installdir}/share/xmake" >> "${xmake_sh_makefile}" fi } diff --git a/core/src/xmake/xmake.sh b/core/src/xmake/xmake.sh index 8bcc60632..6c45b6fa0 100755 --- a/core/src/xmake/xmake.sh +++ b/core/src/xmake/xmake.sh @@ -43,12 +43,12 @@ target "xmake" fi # set the auto-generated config.h - set_configdir "${buildir}/${plat}/${arch}/${mode}" + set_configdir "${builddir}/${plat}/${arch}/${mode}" add_configfiles "xmake.config.h.in" # add includes directory add_includedirs ".." "{public}" - add_includedirs "${buildir}/${plat}/${arch}/${mode}" "{public}" + add_includedirs "${builddir}/${plat}/${arch}/${mode}" "{public}" add_includedirs "../xxhash" add_includedirs "${projectdir}/xmake/scripts/module" |
