diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2022-12-10 13:56:13 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2022-12-13 15:03:24 +0000 |
commit | 57c5d044dc16f488788584851e8b9cc0cf98e8e0 (patch) | |
tree | bd24dbab8ba81f8b838df6506a3b6fbe10e719c2 /configure.ac | |
parent | 71dc8a291ecc5bdae541fce41c8895d6b3302082 (diff) |
bump minimum make version to 4.0 (for $(file …) function)
This already was a requirement for Windows for a few years now, and make
4.0 was released nearly 9 years ago, and it has been used in LO's build
system since it has been added 11 years ago while it was only available
in prerelease versions of make, providing an alternative workaround for
systems that didn't have make built from cvs… I guess it is finally time
to get rid of those workarounds and just require make 4.0 for everyone.
NOTE: reading files with the $(file …) function was only added with
version 4.2 of GNU make, and just using it without contents was added in
4.1, so those usages aren't supported
Change-Id: Ia1c2c86cfdbbd81f349bb9f7188299e16bdd155f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143910
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/configure.ac b/configure.ac index 6325d8c50075..c5a7ee205090 100644 --- a/configure.ac +++ b/configure.ac @@ -6315,36 +6315,12 @@ TAB=`printf '\t'` AC_MSG_CHECKING([the GNU Make version]) _make_version=`$GNUMAKE --version | grep GNU | $GREP -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'` _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` -if test "$_make_longver" -ge "038200"; then +if test "$_make_longver" -ge "040000"; then AC_MSG_RESULT([$GNUMAKE $_make_version]) else - AC_MSG_ERROR([failed ($GNUMAKE version >= 3.82 needed]) + AC_MSG_ERROR([failed ($GNUMAKE version >= 4.0 needed)]) fi -# find if gnumake support file function -AC_MSG_CHECKING([whether GNU Make supports the 'file' function]) -TESTGMAKEFILEFUNC="`mktemp -d -t tst.XXXXXX`" -if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then - TESTGMAKEFILEFUNC=`cygpath -m $TESTGMAKEFILEFUNC` -fi -$SED -e "s/<TAB>/$TAB/" > $TESTGMAKEFILEFUNC/Makefile << EOF -\$(file >test.txt,Success ) - -.PHONY: all -all: -<TAB>@cat test.txt - -EOF -$GNUMAKE -C $TESTGMAKEFILEFUNC 2>/dev/null 1>&2 -if test -f $TESTGMAKEFILEFUNC/test.txt; then - HAVE_GNUMAKE_FILE_FUNC=TRUE - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi -rm -rf $TESTGMAKEFILEFUNC -AC_SUBST(HAVE_GNUMAKE_FILE_FUNC) - _make_ver_check=`$GNUMAKE --version | grep "Built for Windows"` STALE_MAKE= if test "$_make_ver_check" = ""; then @@ -14839,7 +14815,7 @@ else fi -if test \( "$STALE_MAKE" = "TRUE" -o "$HAVE_GNUMAKE_FILE_FUNC" != "TRUE" \) \ +if test \( "$STALE_MAKE" = "TRUE" \) \ -a "$build_os" = "cygwin"; then cat << _EOS @@ -14876,9 +14852,6 @@ Note: autogen.sh will try to use /opt/lo/bin/make if the environment variable GN Alternatively, you can install the 'new' make where ever you want and make sure that `which make` finds it. _EOS -if test "$HAVE_GNUMAKE_FILE_FUNC" != "TRUE"; then - AC_MSG_ERROR([no file function found; the build will fail without it; use GNU make 4.0 or later]) -fi fi |