From 821bf2bd7278da4e71fcdcfc03348a712cd0fc90 Mon Sep 17 00:00:00 2001 From: James Peach Date: Sun, 22 Apr 2007 03:17:31 +0000 Subject: r22441: Add automatic dependency tracking. The dependency generation is toolchain independent, but since there's no portable method for doing makefile includes, we can actually use the dependencies with GNU make. It's easy to add this for other makes, but I don't have any to test. This also moves as much m4 as possible into the m4 directory where no-one has to look at it. AFAICT, there's no way to hide depcomp in there too, which is unfortunate. (This used to be commit aa14900f8291a017aa7fab2bbb9a6c79b12889b2) --- source3/configure.in | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index bc5d5184a4..9980d18f43 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -573,7 +573,29 @@ if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then PIDL_ARGS="$PIDL_ARGS --uint-enums" fi -dnl Figure out the flags to support named structure initializers +############################################ +# Check whether we can do automatic dependency tracking + +m4_include(m4/substnot.m4) +m4_include(m4/cond.m4) +m4_include(m4/make.m4) +m4_include(m4/depout.m4) +m4_include(m4/lead-dot.m4) +m4_include(m4/check_gnu_make.m4) +m4_include(m4/depend.m4) + +# Using the dependency files requires GNU make until someone adds support +# for Makefile includes for other make implementations. +CHECK_GNU_MAKE() +if test "x$_cv_gnu_make_command" != "x" ; then + AC_SUBST(MAKE, $_cv_gnu_make_command) +fi + +AM_DEP_TRACK() +_AM_DEPENDENCIES(CC) + +############################################ +# Figure out the flags to support named structure initializers LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_ERROR([c99 structure initializer are not supported])]) -- cgit