diff options
author | Jim Meyering <jim@meyering.net> | 2004-01-12 14:46:13 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-01-12 14:46:13 +0000 |
commit | 3faa9516f13c33044540f66960527ced2945562c (patch) | |
tree | 40328ab946da07a9396d4312289a79fb33a3e661 | |
parent | 097b35b8fd3446be7c90429021ff6b99350af1c8 (diff) | |
download | coreutils-3faa9516f13c33044540f66960527ced2945562c.tar.xz |
.
-rw-r--r-- | config/depcomp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/config/depcomp b/config/depcomp index 9e5522d04..9beba448a 100644 --- a/config/depcomp +++ b/config/depcomp @@ -1,7 +1,7 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2003-11-08.23 +scriptversion=2003-12-28.12 # Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. @@ -43,6 +43,7 @@ Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). @@ -61,18 +62,10 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi -# `libtool' can also be set to `yes' or `no'. - -if test -z "$depfile"; then - base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` - dir=`echo "$object" | sed 's,/.*$,/,'` - if test "$dir" = "$object"; then - dir= - fi - # FIXME: should be _deps on DOS. - depfile="$dir.deps/$base" -fi +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" |