automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 104-handle-languages-morphing-5.patch


From: Akim Demaille
Subject: Re: 104-handle-languages-morphing-5.patch
Date: 07 May 2001 19:56:22 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

>>>>> "Tom" == Tom Tromey <address@hidden> writes:

Tom> It has been hard for me to figure out what the patches preceding
Tom> this one did.

I understand.

Tom> I'm guessing that we still include depend2 multiple times, but
Tom> that the loop is not visible in this patch?

In fact, this is what happens before my patch:

    foreach my $ext (sort keys %extension_seen)
      {
        my $lang = $languages{$extension_map{$ext}};
...
        if ($use_dependencies && $lang->autodep ne 'no')
          {
...
            foreach my $ext (grep ($extension_seen{$_},
                                   @{$lang->extensions}))
              {
                $output_rules .= (&file_contents ('depend2',
                                                  (%transform,
                                                   'EXT' => $ext))
                                  . "\n");
              }
          }
        elsif (defined $lang->compile)
          {
...
          }

and now it's becoming:

    foreach my $ext (sort keys %extension_seen)
      {
        my $lang = $languages{$extension_map{$ext}};

        if ($use_dependencies && $lang->autodep ne 'no')
          {
...
            $output_rules .= (&file_contents ('depend2',
...
                              . "\n");
          }
        elsif (defined $lang->compile)
          {
...
          }


We are already looping over the extensions, we don't need to loop
again over a language's extensions.

Tom> I think this is ok.  The important thing is that we understand
Tom> that a given language can have multiple extensions in a single
Tom> package, so we might have to emit rules more than once per
Tom> language.

Aaah, yes, now I remember this was the thing I had not understood.

The test that check this (which I now ) are

src/am/tests % grep .cc *.test |grep cxx                         nostromo 19:53
compile_f_c_cxx.test:foo_SOURCES  = foo.f bar.c baz.cc
compile_f_c_cxx.test:: > baz.cc
subobj2.test:wish_SOURCES = generic/a.cc generic/b.cxx

and they both `pass' happily.

PASS: compile_f_c_cxx.test
XFAIL: subobj2.test
=====================================================
All 2 tests behaved as expected (1 expected failures)
=====================================================



reply via email to

[Prev in Thread] Current Thread [Next in Thread]