tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / m4 / make.m4
1 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
2
3 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
4 #
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # AM_MAKE_INCLUDE()
10 # -----------------
11 # Check to see how make treats includes.
12 AC_DEFUN([AM_MAKE_INCLUDE],
13 [am_make=${MAKE-make}
14 cat > confinc << 'END'
15 am__doit:
16         @echo this is the am__doit target
17 .PHONY: am__doit
18 END
19 # If we don't find an include directive, just comment out the code.
20 AC_MSG_CHECKING([for style of include used by $am_make])
21 am__include="#"
22 am__quote=
23 _am_result=none
24 # First try GNU make style include.
25 echo "include confinc" > confmf
26 # Ignore all kinds of additional output from 'make'.
27 case `$am_make -s -f confmf 2> /dev/null` in #(
28 *the\ am__doit\ target*)
29   am__include=include
30   am__quote=
31   _am_result=GNU
32   ;;
33 esac
34 # Now try BSD make style include.
35 if test "$am__include" = "#"; then
36    echo '.include "confinc"' > confmf
37    case `$am_make -s -f confmf 2> /dev/null` in #(
38    *the\ am__doit\ target*)
39      am__include=.include
40      am__quote="\""
41      _am_result=BSD
42      ;;
43    esac
44 fi
45 AC_SUBST([am__include])
46 AC_SUBST([am__quote])
47 AC_MSG_RESULT([$_am_result])
48 rm -f confinc confmf
49 ])