summaryrefslogtreecommitdiff
path: root/m4/make.m4
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-04-19 17:10:25 +0200
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-04-19 17:10:25 +0200
commit45060dd0031cba4439388b7ee6fc119b46903b6d (patch)
treee598137c146e3b039a82422e1ca6296ee39d0389 /m4/make.m4
parent0b77cd4e5d5b846219ba7eb27f2be0bbd54956c6 (diff)
downloadautomake-45060dd0031cba4439388b7ee6fc119b46903b6d.tar.gz
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. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'm4/make.m4')
-rw-r--r--m4/make.m436
1 files changed, 18 insertions, 18 deletions
diff --git a/m4/make.m4 b/m4/make.m4
index 0969d9a79..68d15b9d9 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])