From 2659a0f18e832f4a18f868262163f277b1443db6 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 9 Aug 2022 08:31:03 +0000 Subject: [PATCH] gitlab-ci: Use GNU make on FreeBSD The Makefile.am files contain % pattern rules that are not supported by `make` (bmake) on FreeBSD. Since the replacing the patterns is non-trivial, this commit updates the CI script to use GNU make when building on FreeBSD. --- .gitlab-ci.yml | 2 +- tools/ci-build.sh | 5 ++++- tools/ci-install.sh | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d4df1b20..96c62c6d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -415,7 +415,7 @@ freebsd image: # ones starting with ci_ to ci-build.sh manually. This works because # $(env | grep "ci_.*=") is evaluated on the current host not in the VM. # We also have to forward builddir since this is required by ci-build.sh. - - /app/vmctl exec "cd $CI_PROJECT_NAME && env builddir=$builddir $(echo $(env | grep "ci_.*=")) bash -x ./tools/ci-build.sh $CI_BUILD_ARGS" + - /app/vmctl exec "cd $CI_PROJECT_NAME && env make=gmake builddir=$builddir $(echo $(env | grep "ci_.*=")) bash -x ./tools/ci-build.sh $CI_BUILD_ARGS" # Copy build artifacts from the VM for archiving/JUnit XML display - mkdir -p "$builddir" - scp -v "vm:$CI_PROJECT_NAME/$builddir/config.h" . || true diff --git a/tools/ci-build.sh b/tools/ci-build.sh index f9d9187c..c5915fac 100755 --- a/tools/ci-build.sh +++ b/tools/ci-build.sh @@ -260,7 +260,10 @@ case "$ci_host" in ;; esac -make="make -j${ci_parallel} V=1 VERBOSE=1" +# Allow overriding make (e.g. on FreeBSD it has to be set to gmake) +: "${make:=make}" +export MAKE=${make} +make="${make} -j${ci_parallel} V=1 VERBOSE=1" case "$ci_buildsys" in (autotools) diff --git a/tools/ci-install.sh b/tools/ci-install.sh index 328bb5c7..5b0f9c2a 100755 --- a/tools/ci-install.sh +++ b/tools/ci-install.sh @@ -320,6 +320,7 @@ case "$ci_distro" in expat glib git + gmake libtool libX11 libxslt