]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Detect make `include' style also with parallel non-GNU make.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 19 Apr 2009 15:10:25 +0000 (17:10 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 19 Apr 2009 15:10:25 +0000 (17:10 +0200)
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>
ChangeLog
m4/make.m4

index 05608e2d2b8103f5e5e7fdc4c20f6fdc15e471a7..c715a7035e10caf4ed816f7d9612952483782caf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-04-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       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.
+
        manual: add FAQ `Debugging Make Rules'.
        * doc/automake.texi (Debugging Make Rules): New FAQ section.
        (Top, FAQ): Adjust menus, and capitalization of the description
index 0969d9a79589dfc37375817ef8cf6fc46f80ca7d..68d15b9d9afbf0d13f2162b4b973028bd44ea137 100644 (file)
@@ -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])