Skip to content

Commit 5268c9c

Browse files
committed
external_deps: use gmake instead of make on FreeBSD
1 parent 42fa0a6 commit 5268c9c

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

external_deps/build.sh

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ NCURSES_VERSION=6.5
7272
WASISDK_VERSION=16.0
7373
WASMTIME_VERSION=2.0.2
7474

75+
case "$(uname -s)" in
76+
'FreeBSD')
77+
# The builtin make isn't compatible enough.
78+
MAKE='gmake'
79+
;;
80+
*)
81+
MAKE='make'
82+
;;
83+
esac
84+
7585
log() {
7686
level="${1}"; shift
7787
printf '%s: %s\n' "${level}" "${@}" >&2
@@ -221,8 +231,8 @@ configure_build() {
221231
./configure \
222232
"${configure_args[@]}"
223233

224-
make
225-
make install
234+
"${MAKE}"
235+
"${MAKE}" install
226236
}
227237

228238
get_compiler_name() {
@@ -306,8 +316,8 @@ build_native-pkgconfig() {
306316

307317
(
308318
setup_platform 'native'
309-
CFLAGS='-Wno-error=int-conversion' \
310-
configure_build \
319+
CFLAGS='-Wno-error=int-conversion' \
320+
configure_build \
311321
--with-internal-glib
312322
)
313323
}
@@ -380,8 +390,8 @@ build_zlib() {
380390

381391
case "${PLATFORM}" in
382392
windows-*-*)
383-
LOC="${CFLAGS}" make -f win32/Makefile.gcc PREFIX="${HOST}-"
384-
make -f win32/Makefile.gcc install BINARY_PATH="${PREFIX}/bin" LIBRARY_PATH="${PREFIX}/lib" INCLUDE_PATH="${PREFIX}/include" SHARED_MODE=1
393+
LOC="${CFLAGS}" "${MAKE}" -f win32/Makefile.gcc PREFIX="${HOST}-"
394+
"${MAKE}" -f win32/Makefile.gcc install BINARY_PATH="${PREFIX}/bin" LIBRARY_PATH="${PREFIX}/lib" INCLUDE_PATH="${PREFIX}/include" SHARED_MODE=1
385395
;;
386396
*)
387397
CFLAGS="${CFLAGS} -DZLIB_CONST" \
@@ -612,12 +622,12 @@ build_glew() {
612622
# manually re-add the required flags there.
613623
case "${PLATFORM}" in
614624
macos-*-*)
615-
make "${glew_env[@]}" "${glew_options[@]}"
616-
make install "${glew_env[@]}" "${glew_options[@]}"
625+
"${MAKE}" "${glew_env[@]}" "${glew_options[@]}"
626+
"${MAKE}" install "${glew_env[@]}" "${glew_options[@]}"
617627
;;
618628
*)
619-
env "${glew_env[@]}" make "${glew_options[@]}"
620-
env "${glew_env[@]}" make install "${glew_options[@]}"
629+
env "${glew_env[@]}" "${MAKE}" "${glew_options[@]}"
630+
env "${glew_env[@]}" "${MAKE}" install "${glew_options[@]}"
621631
;;
622632
esac
623633

@@ -1979,7 +1989,7 @@ all-linux)
19791989
;;
19801990
supported-linux)
19811991
platform_list="${supported_linux_platforms}"
1982-
;;
1992+
;;
19831993
extra-linux)
19841994
platform_list="${extra_linux_platforms}"
19851995
;;

0 commit comments

Comments
 (0)