Skip to content

Commit 64d3dc8

Browse files
committed
rename buildir
1 parent 4e803d6 commit 64d3dc8

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ target "demo"
140140
add_files "*.cpp"
141141
add_includedirs "foo" "bar"
142142
add_configfiles "config.h.in"
143-
set_configdir "${buildir}/include"
144-
add_headerfiles "${buildir}/include/config.h" "hello"
143+
set_configdir "${builddir}/include"
144+
add_headerfiles "${builddir}/include/config.h" "hello"
145145
add_headerfiles "(bar/*.h)" "hello"
146146
add_headerfiles "foo/(*.h)" "hello"
147147
add_installfiles "res/(png/**.png)" "share"

configure

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
# some constants
2424
#
2525
xmake_sh_projectdir=$(X= cd -- "$(dirname -- "$0")" && pwd -P)
26-
xmake_sh_buildir="build"
26+
xmake_sh_builddir="build"
2727
xmake_sh_version="1.0.5"
2828
xmake_sh_verbose=false
2929
xmake_sh_diagnosis=false
3030
xmake_sh_copyright="Copyright (C) 2022-present Ruki Wang, tboox.org, xmake.io."
31-
xmake_sh_makefile="${xmake_sh_projectdir}/makefile"
31+
xmake_sh_makefile="${xmake_sh_projectdir}/Makefile"
3232

3333
#-----------------------------------------------------------------------------
3434
# some helper functions
@@ -1499,7 +1499,7 @@ _get_targetdir() {
14991499
local name="${1}"
15001500
_get_target_item "${name}" "targetdir"; local targetdir="${_ret}"
15011501
if test_z "${targetdir}"; then
1502-
targetdir="${xmake_sh_buildir}/${_target_plat}/${_target_arch}/${_target_mode}"
1502+
targetdir="${xmake_sh_builddir}/${_target_plat}/${_target_arch}/${_target_mode}"
15031503
fi
15041504
_ret="${targetdir}"
15051505
}
@@ -1509,7 +1509,7 @@ _get_target_objectdir() {
15091509
local name="${1}"
15101510
_get_target_item "${name}" "objectdir"; local objectdir="${_ret}"
15111511
if test_z "${objectdir}"; then
1512-
objectdir="${xmake_sh_buildir}/.objs/${name}/${_target_plat}/${_target_arch}/${_target_mode}"
1512+
objectdir="${xmake_sh_builddir}/.objs/${name}/${_target_plat}/${_target_arch}/${_target_mode}"
15131513
fi
15141514
_ret="${objectdir}"
15151515
}
@@ -2786,7 +2786,7 @@ Common options:
27862786
- emcc
27872787
- tinycc
27882788
- cosmocc
2789-
--buildir=DIR Set build directory. (default: '"${xmake_sh_buildir}"')
2789+
--builddir=DIR Set build directory. (default: '"${xmake_sh_builddir}"')
27902790
27912791
Autoconf options:
27922792
--build=BUILD Configure for building on BUILD [guessed]
@@ -2882,8 +2882,8 @@ _handle_option() {
28822882
elif test_eq "${name}" "includedir"; then
28832883
_install_includedir_default="${value}"
28842884
return 0
2885-
elif test_eq "${name}" "buildir"; then
2886-
xmake_sh_buildir="${value}"
2885+
elif test_eq "${name}" "builddir" || test_eq "${name}" "buildir"; then
2886+
xmake_sh_builddir="${value}"
28872887
return 0
28882888
elif test_eq "${name}" "build"; then
28892889
_autoconf_build_type="${value}"
@@ -3780,14 +3780,15 @@ _check_all() {
37803780
_check_all
37813781

37823782
#-----------------------------------------------------------------------------
3783-
# init builtin variables, e.g. add_headerfiles "${buildir}/config.h"
3783+
# init builtin variables, e.g. add_headerfiles "${builddir}/config.h"
37843784
#
37853785
projectdir="${xmake_sh_projectdir}"
3786-
if path_is_absolute "${xmake_sh_buildir}"; then
3787-
buildir="${xmake_sh_buildir}"
3786+
if path_is_absolute "${xmake_sh_builddir}"; then
3787+
builddir="${xmake_sh_builddir}"
37883788
else
3789-
buildir="${xmake_sh_projectdir}/${xmake_sh_buildir}"
3789+
builddir="${xmake_sh_projectdir}/${xmake_sh_builddir}"
37903790
fi
3791+
buildir=${builddir} # deprecated
37913792
plat="${_target_plat}"
37923793
arch="${_target_arch}"
37933794
mode="${_target_mode}"

src/xmake.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ target "demo"
4747
add_files "*.cpp"
4848
add_includedirs "foo" "bar"
4949
add_configfiles "config.h.in"
50-
set_configdir "${buildir}/include"
51-
add_headerfiles "${buildir}/include/config.h" "hello"
50+
set_configdir "${builddir}/include"
51+
add_headerfiles "${builddir}/include/config.h" "hello"
5252
add_headerfiles "(bar/*.h)" "hello"
5353
add_headerfiles "foo/(*.h)" "hello"
5454
add_installfiles "res/(png/**.png)" "share"

0 commit comments

Comments
 (0)