From 6e6cef0298049393db611c0e843c660b625fa760 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 12 Apr 2001 05:45:22 +0000 Subject: [PATCH] Fixes report from Larry Jones: * automake.in (handle_dependencies): Add `@_am_quote@' where appropriate. * m4/make.m4 (AM_MAKE_INCLUDE): Handle BSD-style make. --- ChangeLog | 7 +++++++ automake.in | 3 ++- m4/make.m4 | 25 ++++++++++++++++++------- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2b96326..c9aa18f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-04-11 Tom Tromey + + Fixes report from Larry Jones: + * automake.in (handle_dependencies): Add `@_am_quote@' where + appropriate. + * m4/make.m4 (AM_MAKE_INCLUDE): Handle BSD-style make. + 2001-04-11 Akim Demaille * depend2.am: Fix the `if' condition for Libtool. diff --git a/automake.in b/automake.in index c86f5bad..ecafd6e7 100755 --- a/automake.in +++ b/automake.in @@ -3108,7 +3108,8 @@ sub handle_dependencies $output_rules .= "\n"; foreach my $iter (@deplist) { - $output_rules .= '@AMDEP_TRUE@@_am_include@ ' . $iter . "\n"; + $output_rules .= ('@AMDEP_TRUE@@_am_include@ @_am_quote@' + . $iter . '@_am_quote@' . "\n"); } $output_rules .= &file_contents ('depend'); diff --git a/m4/make.m4 b/m4/make.m4 index c5a02dd3..a1b9377a 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 ]) -- 2.43.5