From: Kefu Chai Date: Fri, 12 Feb 2016 15:52:56 +0000 (+0800) Subject: Makefile: workaround an automake bug for "make check" X-Git-Tag: v10.0.4~8^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3c5bc07973bc48c8cd8096cfbce15cbc8b39f41a;p=ceph.git 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) --- diff --git a/src/Makefile.am b/src/Makefile.am index 92706c850858..100d4bf5b865 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