From 30bddc45e7ee9afa4f903d03d367e7e3fdcc2f70 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 12 Feb 2016 23:52:56 +0800 Subject: [PATCH] Makefile: workaround an automake bug for "make check" override the automake variable of am__is_gnu_make. it is a workaround for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18744. this bug was fixed in automake 1.15, but automake 1.13 is supported. so we can not just require 1.15 using `AM_INIT_AUTOMAKE`. this only happens when we have lots of source files *and* we are using automake v1.14 or lower. Fixes: #14723 Signed-off-by: Kefu Chai (cherry picked from commit 19391b71497555c9bcc37b1e063fd4895df605c5) --- src/Makefile.am | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 85ebec7f677b5..d2f99b85a7041 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,20 @@ include Makefile-env.am +# a workaround for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18744, this +# bug was fixed in automake 1.15, but automake 1.13 is supported by us. so +# we can not just require 1.15 using `AM_INIT_AUTOMAKE` +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} + SUBDIRS += ocf java DIST_SUBDIRS += gmock ocf java -- 2.39.5