Edit

kc3-lang/automake/m4/depout.m4

Branch :

  • Show log

    Commit

  • Author : Akim Demaille
    Date : 2000-08-02 08:59:16
    Hash : 4b893ece
    Message : * m4: Quote properly the name of the macros being defined. Use `#' instead of `dnl' where appropriate. * m4/header.m4 (AM_CONFIG_HEADER): Get rid of changequote, just quote. Don't quote passive characters. Pull the AC_PREREQ outside the macro. * m4/init.m4: Pull the AC_PREREQ outside the macro.

  • m4/depout.m4
  • # Generate code to set up dependency tracking.
    # This macro should only be invoked once -- use via AC_REQUIRE.
    # Usage:
    # AM_OUTPUT_DEPENDENCY_COMMANDS
    
    #
    # 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" != x"" ||
    for mf in $CONFIG_FILES; do
      case "$mf" in
      Makefile) dirpart=.;;
      */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
      *) continue;;
      esac
      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"`
      test -z "$DEPDIR" && continue
      # When using ansi2knr, U may be empty or an underscore; expand it
      U=`sed -n -e '/^U = / s///p' < "$mf"`
      test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
      # We invoke sed twice because it is the simplest approach to
      # changing $(DEPDIR) to its actual value in the expansion.
      for file in `sed -n -e '
        /^DEP_FILES = .*\\\\$/ {
          s/^DEP_FILES = //
          :loop
    	s/\\\\$//
    	p
    	n
    	/\\\\$/ b loop
          p
        }
        /^DEP_FILES = / s/^DEP_FILES = //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
        # echo "creating $dirpart/$file"
        echo '# dummy' > "$dirpart/$file"
      done
    done
    ], [AMDEP="$AMDEP"
    ac_aux_dir="$ac_aux_dir"])])