From: Akim Demaille Date: Mon, 15 Oct 2001 07:52:49 +0000 (+0000) Subject: * m4/depend.m4 (AM_DEP_TRACK): Use AC_SUBST([AMDEPBACKSLASH]) X-Git-Tag: Release-1-5b~118 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=261f91ac766c03fc829213e0c0d71d6313c91956;p=automake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 300a88d5..ada4f1ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2001-10-15 Akim Demaille + + * 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 * m4/header.m4 (AM_CONFIG_HEADER): Don't use m4_patsubst. diff --git a/automake.in b/automake.in index 7a8db359..ebae9d41 100755 --- a/automake.in +++ b/automake.in @@ -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 . ':' . $.; } diff --git a/m4/depend.m4 b/m4/depend.m4 index 6478cb83..c95b5fcb 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 dd9b7da9..470e9371 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 303f3612..43ba91d6 100644 --- a/m4/missing.m4 +++ b/m4/missing.m4 @@ -1,3 +1,5 @@ +# -*- Autoconf -*- + ## --------------------------------------------------------- ## ## Fake the existence of programs that GNU maintainers use. ## ## --------------------------------------------------------- ##