1 # Check to see how 'make' treats includes. -*- Autoconf -*-
3 # Copyright (C) 2001-2024 Free Software Foundation, Inc.
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.
11 # Check whether make has an 'include' directive that can support all
12 # the idioms we need for our automatic dependency tracking code.
13 AC_DEFUN([AM_MAKE_INCLUDE],
14 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
15 cat > confinc.mk << 'END'
17 @echo this is the am__doit target >confinc.out
22 # BSD make does it like this.
23 echo '.include "confinc.mk" # ignored' > confmf.BSD
24 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
25 echo 'include confinc.mk # ignored' > confmf.GNU
28 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
29 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
30 ['0:this is the am__doit target'],
32 [BSD], [am__include='.include' am__quote='"'],
33 [am__include='include' am__quote=''])])
34 if test "$am__include" != "#"; then
35 _am_result="yes ($s style)"
39 rm -f confinc.* confmf.*
40 AC_MSG_RESULT([${_am_result}])
41 AC_SUBST([am__include])])
42 AC_SUBST([am__quote])])