@@ -85,8 +85,8 @@ LDFLAGS=''
8585
8686log () {
8787 level=" ${1} " ; shift
88- printf ' %s: %s\n' " ${level^^ } " " ${@ } " >&2
89- [ " ${level} " != ' error ' ]
88+ printf ' %s: %s\n' " ${level} " " ${@ } " >&2
89+ [ " ${level} " != ' ERROR ' ]
9090}
9191
9292# Extract an archive into the given subdirectory of the build dir and cd to it
@@ -120,7 +120,7 @@ extract() {
120120 rmdir " ${2} -dmg"
121121 ;;
122122 * )
123- log error " Unknown archive type for ${1} "
123+ log ERROR " Unknown archive type for ${1} "
124124 ;;
125125 esac
126126 cd " ${2} "
@@ -132,13 +132,13 @@ download() {
132132 while [ ! -f " ${tarball_file} " ]; do
133133 if [ -z " ${1:- } " ]
134134 then
135- log error " No more mirror to download ${tarball_file} from"
135+ log ERROR " No more mirror to download ${tarball_file} from"
136136 fi
137137 local download_url=" ${1} " ; shift
138138 log status " Downloading ${download_url} "
139139 if ! " ${CURL} " -R -L --fail -o " ${tarball_file} " " ${download_url} "
140140 then
141- log warning " Failed to download ${download_url} "
141+ log WARNING " Failed to download ${download_url} "
142142 rm -f " ${tarball_file} "
143143 fi
144144 done
@@ -198,7 +198,7 @@ build_nasm() {
198198 cp " ${dir_name} /nasm" " ${PREFIX} /bin"
199199 ;;
200200 * )
201- log error ' Unsupported platform for NASM'
201+ log ERROR ' Unsupported platform for NASM'
202202 ;;
203203 esac
204204}
@@ -357,7 +357,7 @@ build_sdl2() {
357357 local sdl2_lib_dir=' lib/x64'
358358 ;;
359359 * )
360- log error ' Unsupported platform for SDL2'
360+ log ERROR ' Unsupported platform for SDL2'
361361 ;;
362362 esac
363363
@@ -414,7 +414,7 @@ build_glew() {
414414 make install GLEW_DEST=" ${PREFIX} " CC=" ${CC} " LD=" ${CC} " CFLAGS.EXTRA=" ${CFLAGS} " LDFLAGS.EXTRA=" ${LDFLAGS} " LIBDIR=" ${PREFIX} /lib"
415415 ;;
416416 * )
417- log error ' Unsupported platform for GLEW'
417+ log ERROR ' Unsupported platform for GLEW'
418418 ;;
419419 esac
420420}
@@ -460,7 +460,7 @@ build_jpeg() {
460460 # Other platforms can build but we need need to explicitly
461461 # set CMAKE_SYSTEM_NAME for CMAKE_CROSSCOMPILING to be set
462462 # and CMAKE_SYSTEM_PROCESSOR to not be ignored by cmake.
463- log error ' Unsupported platform for JPEG'
463+ log ERROR ' Unsupported platform for JPEG'
464464 ;;
465465 esac
466466
@@ -482,7 +482,7 @@ build_jpeg() {
482482 local SYSTEM_PROCESSOR=' arm'
483483 ;;
484484 * )
485- log error ' Unsupported platform for JPEG'
485+ log ERROR ' Unsupported platform for JPEG'
486486 ;;
487487 esac
488488
@@ -539,7 +539,7 @@ build_openal() {
539539 -DCMAKE_BUILD_TYPE=Release -DALSOFT_EXAMPLES=OFF)
540540 ;;
541541 * )
542- log error ' Unsupported platform for OpenAL'
542+ log ERROR ' Unsupported platform for OpenAL'
543543 ;;
544544 esac
545545
@@ -695,7 +695,7 @@ build_wasisdk() {
695695 * -amd64-* )
696696 ;;
697697 * )
698- log error " wasi doesn't have release for ${PLATFORM} "
698+ log ERROR " wasi doesn't have release for ${PLATFORM} "
699699 ;;
700700 esac
701701
@@ -735,7 +735,7 @@ build_wasmtime() {
735735 local WASMTIME_ARCH=aarch64
736736 ;;
737737 * )
738- log error " wasmtime doesn't have release for ${PLATFORM} "
738+ log ERROR " wasmtime doesn't have release for ${PLATFORM} "
739739 ;;
740740 esac
741741
@@ -863,7 +863,7 @@ build_naclruntime() {
863863 local NACL_ARCH=x86-64
864864 ;;
865865 * )
866- log error ' Unsupported platform for naclruntime'
866+ log ERROR ' Unsupported platform for naclruntime'
867867 ;;
868868 esac
869869
@@ -903,7 +903,7 @@ build_genlib() {
903903 local MACHINE=' i386:x86-64'
904904 ;;
905905 * )
906- log error ' Unsupported platform for genlib'
906+ log ERROR ' Unsupported platform for genlib'
907907 ;;
908908 esac
909909
@@ -917,7 +917,7 @@ build_genlib() {
917917 done
918918 ;;
919919 * )
920- log error ' Unsupported platform for genlib'
920+ log ERROR ' Unsupported platform for genlib'
921921 ;;
922922 esac
923923}
@@ -1038,7 +1038,7 @@ common_setup_arch() {
10381038 CXXFLAGS+=' -march=armv7-a -mfpu=neon'
10391039 ;;
10401040 * )
1041- log error ' Unsupported platform'
1041+ log ERROR ' Unsupported platform'
10421042 ;;
10431043 esac
10441044}
0 commit comments