]> sourceware.org Git - automake.git/commitdiff
* automake.in (handle_single_transform_list): Don't strip the
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 20 Nov 2002 23:28:03 +0000 (23:28 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 20 Nov 2002 23:28:03 +0000 (23:28 +0000)
directory from $full_ansi.  This reverts my patch of 2002-10-16.
(lang_c_finish): Use the full filename, including the directory,
in the .c -> _.c rule.  These two files must reside in the same
directory.
* tests/ansi6.test: Also try to compile without ansi2knr.
Reported by Andreas Schwab

ChangeLog
automake.in
tests/ansi6.test

index 60fa609ec179cc678bbb0459e6e5d968e096a9f3..63002eb5a943c9e742bd6cf30f005a7d36436750 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-11-21  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * automake.in (handle_single_transform_list): Don't strip the
+       directory from $full_ansi.  This reverts my patch of 2002-10-16.
+       (lang_c_finish): Use the full filename, including the directory,
+       in the .c -> _.c rule.  These two files must reside in the same
+       directory.
+       * tests/ansi6.test: Also try to compile without ansi2knr.
+       Reported by Andreas Schwab
+
 2002-11-20  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * lib/Automake/Conditional.pm (strip): New function.
index 58a123ed46982c6c224bce245c5b75c1b669b460..2350b028e001571c74202e07031100e6298e75e9 100755 (executable)
@@ -2453,8 +2453,6 @@ sub handle_single_transform_list ($$$$@)
                if ($lang->ansi && defined $options{'ansi2knr'})
                  {
                    $full_ansi =~ s/$KNOWN_EXTENSIONS_PATTERN$/\$U$&/;
-                   $full_ansi = basename $full_ansi
-                     unless defined $options{'subdir-objects'};
                  }
 
                my $val = ("$full_ansi $obj_sans_ext "
@@ -5610,16 +5608,17 @@ sub lang_c_finish
            # we can't use $< -- some makes only define $< during a
            # suffix rule.
            my $ansfile = $de_ansi_files{$base} . $base . '.c';
-           $output_rules .= ($base . "_.c: $ansfile \$(ANSI2KNR)\n\t"
+           my $root = $de_ansi_files{$base} . $base;
+           $output_rules .= ($root . "_.c: $ansfile \$(ANSI2KNR)\n\t"
                              . '$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) '
                              . '`if test -f $(srcdir)/' . $ansfile
                              . '; then echo $(srcdir)/' . $ansfile
                              . '; else echo ' . $ansfile . '; fi` '
                              . "| sed 's/^# \\([0-9]\\)/#line \\1/' "
-                             . '| $(ANSI2KNR) > ' . $base . "_.c"
+                             . '| $(ANSI2KNR) > $@'
                              # If ansi2knr fails then we shouldn't
                              # create the _.c file
-                             . " || rm -f ${base}_.c\n");
+                             . " || rm -f ${root}_.c\n");
            push (@objects, $base . '_.$(OBJEXT)');
            push (@objects, $base . '_.lo')
              if variable_defined ('LIBTOOL');
index f7c709aa58e7794c0d2125d881b661d7108b4fa5..735b3a9c8553c2d59303e90947984b2236e76bd8 100755 (executable)
@@ -74,3 +74,10 @@ grep ac_cv_prog_cc_stdc configure
 
 ./configure ac_cv_prog_cc_stdc=no
 $MAKE
+
+# Also run without forcing ansi2knr, so we make sure the
+# rules work with ANSI compilers.
+# Report from Andreas Schwab.
+$MAKE distclean
+./configure
+$MAKE
This page took 0.038848 seconds and 5 git commands to generate.