summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorAkim Demaille <akim@epita.fr>2001-10-15 07:52:52 +0000
committerAkim Demaille <akim@epita.fr>2001-10-15 07:52:52 +0000
commit21ba32360dd993fc747bfd93447a5584ca4cb1f7 (patch)
tree890d2c3f08c4a27a996abb674f7794790de9c5b2 /m4
parenta8fc58a2c9126db272d81a7bf454c62188ebd131 (diff)
downloadautomake-21ba32360dd993fc747bfd93447a5584ca4cb1f7.tar.gz
* 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.
Diffstat (limited to 'm4')
-rw-r--r--m4/depend.m411
-rw-r--r--m4/depout.m445
-rw-r--r--m4/missing.m42
3 files changed, 32 insertions, 26 deletions
diff --git a/m4/depend.m4 b/m4/depend.m4
index 6478cb838..c95b5fcbe 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -27,7 +27,7 @@
# _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.
@@ -106,8 +106,7 @@ else
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])
])
@@ -125,7 +124,7 @@ else
DEPDIR=_deps
fi
rmdir .deps 2>/dev/null
-AC_SUBST(DEPDIR)
+AC_SUBST([DEPDIR])
])
@@ -140,7 +139,5 @@ if test "x$enable_dependency_tracking" != xno; then
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-pushdef([subst], defn([AC_SUBST]))
-subst(AMDEPBACKSLASH)
-popdef([subst])
+AC_SUBST([AMDEPBACKSLASH])
])
diff --git a/m4/depout.m4 b/m4/depout.m4
index dd9b7da96..470e93713 100644
--- a/m4/depout.m4
+++ b/m4/depout.m4
@@ -1,4 +1,4 @@
-# Generate code to set up dependency tracking.
+# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
@@ -17,24 +17,18 @@
# 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"`
@@ -58,11 +52,24 @@ for mf in $CONFIG_FILES; do
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"])
+])
diff --git a/m4/missing.m4 b/m4/missing.m4
index 303f3612e..43ba91d6e 100644
--- a/m4/missing.m4
+++ b/m4/missing.m4
@@ -1,3 +1,5 @@
+# -*- Autoconf -*-
+
## --------------------------------------------------------- ##
## Fake the existence of programs that GNU maintainers use. ##
## --------------------------------------------------------- ##