[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BSD Make
From: |
Tom Tromey |
Subject: |
Re: BSD Make |
Date: |
11 Apr 2001 15:32:21 -0600 |
>>>>> "Derek" == Derek R Price <address@hidden> writes:
Derek> A new bug report on the BSD make's include syntax... sounds
Derek> like we're pretty close.
Can you test the appended patch? If it works I will check it in. I
don't have access to a BSD `make' to try it.
2001-04-11 Tom Tromey <address@hidden>
* automake.in (handle_dependencies): Add address@hidden@' where
appropriate.
* m4/make.m4 (AM_MAKE_INCLUDE): Handle BSD-style make.
Tom
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1034
diff -u -r1.1034 automake.in
--- automake.in 2001/04/10 09:20:59 1.1034
+++ automake.in 2001/04/11 21:18:52
@@ -3108,7 +3108,8 @@
$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');
Index: m4/make.m4
===================================================================
RCS file: /cvs/automake/automake/m4/make.m4,v
retrieving revision 1.4
diff -u -r1.4 make.m4
--- make.m4 2001/04/11 04:17:21 1.4
+++ make.m4 2001/04/11 21:18:52
@@ -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,27 @@
# 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
+fi
done
AC_SUBST(_am_include)
-AC_MSG_RESULT($_am_include)
+AC_SUBST(_am_quote)
+AC_MSG_RESULT($_am_result)
rm -f confinc confmf
])
- Re: BSD Make,
Tom Tromey <=