2002-12-04 Alexandre Duret-Lutz <adl@gnu.org>
+ * automake.in (handle_languages): Test $objdir, not $srcdir, to
+ decides whether a _.c file is in a subdirectory and has to be
+ cleaned separately.
+ Reported by Kevin Ride.
+
* tests/ansi10.test (liblib_a_LIBADD): Set ac_cv_prog_cc_stdc
not am_cv_prog_cc_stdc.
# we have to create foo_.c in the current directory.
# (Unless the user asks 'subdir-objects'.) This is important
# in case the same file (`foo.c') is compiled from other
- # directories with different cpp options: foo_.c file would
- # be preprocessed for only once set of options if it were
- # but in the subdirectory.
+ # directories with different cpp options: foo_.c would
+ # be preprocessed for only one set of options if it were
+ # put in the subdirectory.
#
- # Because foo$U.o must be build from either foo_.c or
+ # Because foo$U.o must be built from either foo_.c or
# sub/foo.c we can't be as concise as in the first example.
# Instead we output
#
(my $source_ = $source) =~ s/\$U/_/g;
# Explicitely clean the _.c files if they are in
# a subdirectory. (In the current directory they get
- # erase by a `rm -f *_.c' rule.)
+ # erased by a `rm -f *_.c' rule.)
$clean_files{$source_} = MOSTLY_CLEAN
- if $srcdir ne '.';
+ if $objdir ne '.';
# Output an additional rule if _.c and .c are not in
# the same directory. (_.c is always in $objdir.)
if ($objdir ne $srcdir)