summaryrefslogtreecommitdiff
path: root/m4/make.m4
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-04-12 05:45:23 +0000
committerTom Tromey <tromey@redhat.com>2001-04-12 05:45:23 +0000
commit8d571e126576e868d4a2283c3b7a6c1dd7a3cdba (patch)
tree84f243721e91e25d13f1542bc21124c6c52ebc73 /m4/make.m4
parent8c16004887ad908aecbf1233a62b79ca221f0d1a (diff)
downloadautomake-8d571e126576e868d4a2283c3b7a6c1dd7a3cdba.tar.gz
Fixes report from Larry Jones:
* automake.in (handle_dependencies): Add `@_am_quote@' where appropriate. * m4/make.m4 (AM_MAKE_INCLUDE): Handle BSD-style make.
Diffstat (limited to 'm4/make.m4')
-rw-r--r--m4/make.m425
1 files changed, 18 insertions, 7 deletions
diff --git a/m4/make.m4 b/m4/make.m4
index c5a02dd3a..a1b9377a1 100644
--- a/m4/make.m4
+++ b/m4/make.m4
@@ -3,7 +3,6 @@
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
-# BSD make uses .include
cat > confinc << 'END'
doit:
@echo done
@@ -11,14 +10,26 @@ END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
_am_include='#'
-for am_inc in include .include; do
- echo "$am_inc confinc" > confmf
+_am_quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ _am_include=include
+ _am_quote=
+ _am_result=GNU
+fi
+# 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=$am_inc
- break
+ _am_include=.include
+ _am_quote='"'
+ _am_result=BSD
fi
-done
+fi
AC_SUBST(_am_include)
-AC_MSG_RESULT($_am_include)
+AC_SUBST(_am_quote)
+AC_MSG_RESULT($_am_result)
rm -f confinc confmf
])