summaryrefslogtreecommitdiff
path: root/ci/ci_verify_makefiles.sh
diff options
context:
space:
mode:
authorCosmin Truta <ctruta@gmail.com>2022-11-27 21:58:07 +0200
committerCosmin Truta <ctruta@gmail.com>2022-11-27 21:58:07 +0200
commit9db8cff6ef9b213f27263865a145a4c0e7ef08fc (patch)
tree239ac3db403fe5483d1af0c7fe2e674945bd799d /ci/ci_verify_makefiles.sh
parentb445aade83e55bb62095e7efdcfd38b540609750 (diff)
downloadlibpng-9db8cff6ef9b213f27263865a145a4c0e7ef08fc.tar.gz
ci: Fix verification under Cygwin Bash + CMake + Visual Studio; update
Fix autodetection and use of the cygpath executable on Windows. Add a new variable CI_CMAKE_TOOLCHAIN_FILE to ci_verify_cmake.sh. This should help in future cross-platform testing. Remove the implicit initialization of CI_CC, CI_LD and CI_LIBS from ci_verify_makefiles.sh. This should help the testing of default values of their respective make variables (CC, LD and LIBS).
Diffstat (limited to 'ci/ci_verify_makefiles.sh')
-rwxr-xr-xci/ci_verify_makefiles.sh13
1 files changed, 2 insertions, 11 deletions
diff --git a/ci/ci_verify_makefiles.sh b/ci/ci_verify_makefiles.sh
index 17658f711..9f65ec021 100755
--- a/ci/ci_verify_makefiles.sh
+++ b/ci/ci_verify_makefiles.sh
@@ -35,23 +35,14 @@ function ci_init_makefiles {
CI_SYSTEM_NAME="$(uname -s)"
CI_MACHINE_NAME="$(uname -m)"
CI_MAKE="${CI_MAKE:-make}"
- case "$CI_SYSTEM_NAME" in
- ( Darwin | *BSD | DragonFly )
- [[ -x $(command -v clang) ]] && CI_CC="${CI_CC:-clang}" ;;
- ( * )
- [[ -x $(command -v gcc) ]] && CI_CC="${CI_CC:-gcc}" ;;
- esac
- CI_CC="${CI_CC:-cc}"
case "$CI_CC" in
( *clang* )
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.clang"}" ;;
( *gcc* )
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.gcc"}" ;;
- ( cc | c89 | c99 )
+ ( * )
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.std"}" ;;
esac
- CI_LD="${CI_LD:-"$CI_CC"}"
- CI_LIBS="${CI_LIBS:-"-lz -lm"}"
}
function ci_trace_makefiles {
@@ -113,7 +104,7 @@ function ci_build_makefiles {
[[ $CI_RANLIB ]] && ALL_MAKE_VARS+=(RANLIB="$CI_RANLIB")
[[ $CI_LD ]] && ALL_MAKE_VARS+=(LD="$CI_LD")
[[ $ALL_LD_FLAGS ]] && ALL_MAKE_VARS+=(LDFLAGS="$ALL_LD_FLAGS")
- ALL_MAKE_VARS+=(LIBS="$CI_LIBS")
+ [[ $CI_LIBS ]] && ALL_MAKE_VARS+=(LIBS="$CI_LIBS")
ALL_MAKE_VARS+=($CI_MAKE_VARS)
# Build!
ci_spawn cd "$CI_SRCDIR"