]> sourceware.org Git - automake.git/commitdiff
* m4/depend.m4 (AM_DEP_TRACK): Use AC_SUBST([AMDEPBACKSLASH])
authorAkim Demaille <akim@epita.fr>
Mon, 15 Oct 2001 07:52:49 +0000 (07:52 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 15 Oct 2001 07:52:49 +0000 (07:52 +0000)
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.

ChangeLog
automake.in
m4/depend.m4
m4/depout.m4
m4/missing.m4

index 300a88d540d8b4b292380df662936793da53467e..ada4f1ab95416ad2da8b7a8674ddc3bfec73c65a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+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.
index 7a8db3595c44a20620f76415a7cd2018bc076906..ebae9d41300c07fbd5bcf2df3a6ba75f7661b345 100755 (executable)
@@ -4775,11 +4775,13 @@ sub scan_one_autoconf_file
        # 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 . ':' . $.;
        }
index 6478cb838d69f9d1b8ba8ab440e6c5020cec263a..c95b5fcbe806fbfeece0cee1b7ea4b3a2436a5bd 100644 (file)
@@ -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])
 ])
index dd9b7da96708d33854a80eaf1d60ff1260d2277d..470e93713ee6cae26b05f6a08fdb11ebb7e9db4c 100644 (file)
@@ -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.
 
 # 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"])
+])
index 303f3612e17cb3fa892da8bbd6e054a15faf553a..43ba91d6e8682610dbac5e39587cb4e49a141ff4 100644 (file)
@@ -1,3 +1,5 @@
+#  -*- Autoconf -*-
+
 ## --------------------------------------------------------- ##
 ## Fake the existence of programs that GNU maintainers use.  ##
 ## --------------------------------------------------------- ##
This page took 0.045951 seconds and 5 git commands to generate.