[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Detect make `include' style also with parallel non-GNU make.
From: |
Ralf Wildenhues |
Subject: |
Detect make `include' style also with parallel non-GNU make. |
Date: |
Sun, 19 Apr 2009 17:36:54 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
When parallel mode is enabled, BSD and HP-UX make versions tend to be
pretty verbose. This breaks the AM_MAKE_INCLUDE test with, say,
./configure MAKE="make -j3"
because the test matches exact output. The MAKE setting is unusual,
but can happen in practice for example when I try to run all tests in
the Automake testsuite with a parallel make, as in
MAKE="make -j3" make -j3 check
I've never understood why this test is so strict in its output, and
history doesn't tell me either, so I'm relaxing it with this patch,
but making the match a bit longer so that not only the target name
needs to be found.
Cheers,
Ralf
Detect make `include' style also with parallel non-GNU make.
Parallel NetBSD make outputs `--- $target ---' messages,
parallel HP-UX make outputs `Making target"$target"'. Just
ignore all additional output for the include test.
* m4/make.m4 (AM_MAKE_INCLUDE): Ignore additional output
produced by `make' to relax `include' style detection.
diff --git a/m4/make.m4 b/m4/make.m4
index 0969d9a..68d15b9 100644
--- a/m4/make.m4
+++ b/m4/make.m4
@@ -1,12 +1,12 @@
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 3
+# serial 4
# AM_MAKE_INCLUDE()
# -----------------
@@ -15,7 +15,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
- @echo done
+ @echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
@@ -25,24 +25,24 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" =
"done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Detect make `include' style also with parallel non-GNU make.,
Ralf Wildenhues <=