[Libreoffice-commits] .: 2 commits - config_host.mk.in configure.in solenv/gbuild

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Sun Mar 25 10:45:44 PDT 2012


 config_host.mk.in         |    1 +
 configure.in              |   22 ++++++++++++++++++++++
 solenv/gbuild/Tempfile.mk |    7 +++++++
 3 files changed, 30 insertions(+)

New commits:
commit e00cb3336f3f6ad802173f90fd93a120b8c95b52
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Mar 25 12:45:24 2012 -0500

    use $(file in gbuild when available

diff --git a/solenv/gbuild/Tempfile.mk b/solenv/gbuild/Tempfile.mk
index e7e9279..87f582b 100644
--- a/solenv/gbuild/Tempfile.mk
+++ b/solenv/gbuild/Tempfile.mk
@@ -1,4 +1,10 @@
 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+ifeq ($(HAVE_GNUMAKE_FILE_FUNC),YES)
+define var2file
+$(file >$(1),$(3))
+endef
+else
 # Write string to temporary file by chopping into pieces that
 # fit the commandline
 # parameters: filename, maxitems (for one write), string
@@ -16,5 +22,6 @@ $(foreach item,$(3),$(eval gb_var2file_curblock += $(item)
 		gb_var2file_curblock :=
 	))
 endef
+endif
 
 # vim: set noet sw=4 ts=4:
commit fd83e6cb19bf20bee89759ca7d70ed667ccd334e
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Mar 25 12:45:04 2012 -0500

    detect of gnumake support $(file function
    
    $(file is a new function that landed in gnu-make cvs
    it allow to write a makefile variable directly into a file
    bypassing the usual command line size limitiation

diff --git a/config_host.mk.in b/config_host.mk.in
index 945e130..c9103f0 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -188,6 +188,7 @@ export HAVE_GCC_AVX=@HAVE_GCC_AVX@
 export HAVE_GCC_NO_LONG_DOUBLE=@HAVE_GCC_NO_LONG_DOUBLE@
 export HAVE_GCC_VISIBILITY_BROKEN=@HAVE_GCC_VISIBILITY_BROKEN@
 export HAVE_GCC_VISIBILITY_FEATURE=@HAVE_GCC_VISIBILITY_FEATURE@
+export HAVE_GNUMAKE_FILE_FUNC@=HAVE_GNUMAKE_FILE_FUNC@
 export HAVE_SFINAE_ANONYMOUS_BROKEN=@HAVE_SFINAE_ANONYMOUS_BROKEN@
 export HAVE_GETOPT=@HAVE_GETOPT@
 export HAVE_LD_BSYMBOLIC_FUNCTIONS=@HAVE_LD_BSYMBOLIC_FUNCTIONS@
diff --git a/configure.in b/configure.in
index 065c135..8276698 100644
--- a/configure.in
+++ b/configure.in
@@ -76,6 +76,7 @@ else
     SRC_ROOT=`pwd`
     x_Cygwin=[\#]
 fi
+
 AC_SUBST(SRC_ROOT)
 AC_SUBST(EXEEXT_FOR_BUILD)
 AC_SUBST(x_Cygwin)
@@ -3682,6 +3683,27 @@ EOF
 else
     AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed])
 fi
+
+# find if gnumake support file function
+AC_MSG_CHECKING([for GNU support for (file function])
+TESTGMAKEFILEFUNC="`mktemp -d -t tst.XXXXXX`"
+cat > $TESTGMAKEFILEFUNC/Makefile << EOF
+\$(file >test.txt,Success )
+
+.PHONY: all
+all:
+	@cat test.txt
+
+EOF
+$GNUMAKE -C $TESTGMAKEFILEFUNC 2>/dev/null 1>&2
+if test -f $TESTGMAKEFILEFUNC/test.txt ; then
+    HAVE_GNUMKAE_FILE_FUNC="YES"
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+rm -rf $TESTGMAKEFILEFUNC
+AC_SUBST(HAVE_GNUMAKE_FILE_FUNC)
 AC_SUBST(GNUMAKE)
 
 _make_ver_check=`$GNUMAKE --version | grep LibreOffice`;


More information about the Libreoffice-commits mailing list