diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2003-12-30 23:49:58 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2003-12-30 23:49:58 +0000 |
commit | 13089ee25af9df3c6a32842fdb30ca9fb14b7414 (patch) | |
tree | a31df7bdfc24cbfe85841cdc7eb51c85fa248139 /lib/depcomp | |
parent | 6b0ea352792c2ed3d164eba6ccedbddb1b973a03 (diff) | |
download | automake-13089ee25af9df3c6a32842fdb30ca9fb14b7414.tar.gz |
* automake.in (handle_languages): Define %DEPBASE% conditionally
on subdir-objects. Define SUBDIROBJ. Do not clean *_.c files
here ...
(lang_c_finish): ... do it here.
(handle_single_transform_list): Do not output specific rules for
subdir-objects files which are not renamed. This should reduce
the size of Makefiles with lots of subdirectory sources.
* lib/depcomp: Simplify computation of dependency output, and use
DEPDIR.
* lib/am/depend2.am (%EXT%.o, %EXT%.obj, %EXT%.lo): Adjust call
to depcomp. Compute depbase on-the-fly in generic fastdep rules
for subdir-objects.
* tests/ansi9.test: Do not grep for an explicit rule that
we no longer expect. Really run $MAKE to make sure the chain
of rules works.
* tests/yacc5.test: Do not grep for an explicit rule that
we no longer expect. Adjust to use set -e.
Diffstat (limited to 'lib/depcomp')
-rwxr-xr-x | lib/depcomp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/depcomp b/lib/depcomp index 9e5522d04..9beba448a 100755 --- a/lib/depcomp +++ b/lib/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" |