+2001-02-04 Tom Tromey <tromey@redhat.com>
+
+ * m4/Makefile.am (m4data_DATA): Added make.m4.
+ * automake.in (handle_dependencies): Use @AM_INCLUDE@ to include
+ dependency files.
+ * m4/depend.m4 (AM_DEPNDENCIES): Require AM_MAKE_INCLUDE.
+ Copy depcomp to subdir.
+ * m4/make.m4: New file.
+
2001-02-04 Pavel Roskin <proski@gnu.org>
* automake.in (handle_dist_worker): Remove a line that is now
$output_rules .= "\n";
foreach $iter (@deplist)
{
- $output_rules .= "\@AMDEP\@" . 'include ' . $iter . "\n";
+ $output_rules .= "\@AMDEP\@\@AM_INCLUDE\@ " . $iter . "\n";
}
$output_rules .= &file_contents ('depend');
m4datadir = $(datadir)/aclocal
m4data_DATA = ccstdc.m4 cond.m4 depend.m4 depout.m4 dmalloc.m4 \
-error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 maintainer.m4 \
-minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 ptrdiff.m4 \
-python.m4 regex.m4 sanity.m4 strtod.m4 termios.m4 winsz.m4
+error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \
+maintainer.m4 minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 \
+ptrdiff.m4 python.m4 regex.m4 sanity.m4 strtod.m4 termios.m4 winsz.m4
EXTRA_DIST = $(m4data_DATA)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
+INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
m4datadir = $(datadir)/aclocal
m4data_DATA = ccstdc.m4 cond.m4 depend.m4 depout.m4 dmalloc.m4 \
-error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 maintainer.m4 \
-minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 ptrdiff.m4 \
-python.m4 regex.m4 sanity.m4 strtod.m4 termios.m4 winsz.m4
+error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \
+maintainer.m4 minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 \
+ptrdiff.m4 python.m4 regex.m4 sanity.m4 strtod.m4 termios.m4 winsz.m4
EXTRA_DIST = $(m4data_DATA)
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= CONFIG_COMMANDS= $(SHELL) ./config.status
install-m4dataDATA: $(m4data_DATA)
depcc="$$1"
depcpp=""])
+AC_REQUIRE([AM_MAKE_INCLUDE])
+
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP"; then
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir confdir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" confdir
cd confdir
am_cv_$1_dependencies_compiler_type=none
- for depmode in `sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < "$am_depcomp"`; do
+ for depmode in `sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < "./depcomp"`; do
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
if depmode="$depmode" \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL $am_depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1; then
am_cv_$1_dependencies_compiler_type="$depmode"
break
--- /dev/null
+# AM_MAKE_INCLUDE()
+# -----------------
+# 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
+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
+ if test "`$am_make -f confmf 2> /dev/null`" = "done"; then
+ AM_INCLUDE=$am_inc
+ break
+ fi
+done
+AC_SUBST(AM_INCLUDE)
+AC_MSG_RESULT($AM_INCLUDE)
+rm -f confinc confmf
+])