+2001-10-15 Akim Demaille <akim@epita.fr>
+
+ * m4/depend.m4 (AM_DEP_TRACK): Use AC_SUBST([AMDEPBACKSLASH])
+ normally, what is wrong is that automake outputs a variable
+ definition for it, hence...
+ * automake.in (scan_one_autoconf_file): don't.
+
+ * m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): New, extracted
+ from...
+ (AM_OUTPUT_DEPENDENCY_COMMANDS): here. Adjust.
+ Use AC_CONFIG_COMMANDS.
+ (_AM_OUTPUT_DEPENDENCY_COMMANDS): Use AS_DIRNAME and AS_MKDIR_P.
+
+
2001-10-15 Akim Demaille <akim@epita.fr>
* m4/header.m4 (AM_CONFIG_HEADER): Don't use m4_patsubst.
# but later define it elsewhere. This is pretty hacky. We
# also explicitly avoid INSTALL_SCRIPT and some other
# variables because they are defined in header-vars.am.
- # FIXME.
+ # AMDEPBACKSLASH might be subst'd by `\', which certainly would
+ # not be appreciated by Make.
if (/$AC_SUBST_PATTERN/o
&& $1 ne 'ANSI2KNR'
&& $1 ne 'INSTALL_SCRIPT'
- && $1 ne 'INSTALL_DATA')
+ && $1 ne 'INSTALL_DATA'
+ && $1 ne 'AMDEPBACKSLASH')
{
$configure_vars{$1} = $filename . ':' . $.;
}
# _AM_DEPENDENCIES(NAME)
-# ---------------------
+# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX" or "OBJC".
# We try a few techniques and use that to set a single cache variable.
am_cv_$1_dependencies_compiler_type=none
fi
])
-$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
-AC_SUBST([$1DEPMODE])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
])
DEPDIR=_deps
fi
rmdir .deps 2>/dev/null
-AC_SUBST(DEPDIR)
+AC_SUBST([DEPDIR])
])
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-pushdef([subst], defn([AC_SUBST]))
-subst(AMDEPBACKSLASH)
-popdef([subst])
+AC_SUBST([AMDEPBACKSLASH])
])
-# Generate code to set up dependency tracking.
+# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# This macro should only be invoked once -- use via AC_REQUIRE.
-# Usage:
-# AM_OUTPUT_DEPENDENCY_COMMANDS
+#serial 2
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
-AC_OUTPUT_COMMANDS([
-test x"$AMDEP_TRUE" != x"" ||
-for mf in $CONFIG_FILES; do
- case "$mf" in
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ case $mf in
Makefile) dirpart=.;;
- */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ */Makefile) dirpart=`AS_DIRNAME("$mf")`;;
*) continue;;
esac
- grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
- fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
- $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
-], [AMDEP_TRUE="$AMDEP_TRUE"
-ac_aux_dir="$ac_aux_dir"])])
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])