Hi Rob:  As far as I can tell, there are two problems.  The first is that 
the 'pure_all' target (which is built as a part of 'make') and is also a 
dependency of 'make test' does not stay done after 'make'.  When pure_all 
is required a second time during 'make test', all of PDL gets rebuilt.

I was unable after an afternoon of fiddling to figure out why this was, 
but I was able to eliminate the pure_all dependency for 'make test', thus 
forcing it to not rebuild PDL.

The second problem is that the 'subdirs-test' target, which is normally 
run after the top-level tests ('$(TEST_TYPE) which equals 'test_dynamic' 
in my case) is causing significant rebuild of individual sub-directories 
to run (non-existent) directory-level tests.  This causes the extended 
chatter after the top-level tests are run.

Here is the 'make test' section of the top-level Makefile which results
from the default invocation of MakeMaker, without my patch:

------------------%<---------------------------------------------------
test :: $(TEST_TYPE) subdirs-test

subdirs-test ::
         $(NOECHO) $(NOOP)

subdirs-test ::
         $(NOECHO) cd Basic && $(MAKE) test $(PASTHRU)

subdirs-test ::
         $(NOECHO) cd Demos && $(MAKE) test $(PASTHRU)

subdirs-test ::
         $(NOECHO) cd Doc && $(MAKE) test $(PASTHRU)

subdirs-test ::
         $(NOECHO) cd Graphics && $(MAKE) test $(PASTHRU)

subdirs-test ::
         $(NOECHO) cd IO && $(MAKE) test $(PASTHRU)

subdirs-test ::
         $(NOECHO) cd Lib && $(MAKE) test $(PASTHRU)

test_dynamic :: pure_all
         PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" 
"test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" 
$(TEST_FILES)

...(test_static section omitted)...
------------------%<---------------------------------------------------

My patch is the addition of 'sub MY::test' which filters the above
Makefile test section, removing the 'pure_all' and 'subdirs-test' targets:

sub MY::test {
   package MY; # so that "SUPER" works right
   my $inherited = shift->SUPER::test(@_);
   $inherited =~ s/pure_all//g;
   $inherited =~ s/subdirs\-test$//mg;
   return $inherited;
}

It would be preferable to understand why the pure_all target needs to be
rebuilt the second time and also to understand why 'subdirs-test' rebuilds 
the subdir even when it has already been built during the previous 'make'.

If I get some time, I'll look into this more.  In the mean time, any 
insights you have would be most welcome!

Thanks,

   Doug

[EMAIL PROTECTED]
Software Engineer III
UCAR - COSMIC, Tel. (303) 497-2611

On Tue, 28 Oct 2008, Sisyphus wrote:

>
> ----- Original Message ----- From: "Doug Hunt" <[EMAIL PROTECTED]>
> To: "Sisyphus" <[EMAIL PROTECTED]>
> Cc: "Chris Marshall" <[EMAIL PROTECTED]>; "perldl list" 
> <[email protected]>
> Sent: Friday, October 24, 2008 1:33 AM
> Subject: Re: [Perldl] please test PDL-cvs for round 02
>
>
>> Hi Rob:  I intentionally made 'make test' do *only* the tests, since I 
>> could not figure out why the 'pure_all' target was causing a rebuild during 
>> 'make test' right after that target was built using 'make'.
>> 
>> The right fix would be to get 'pure_all' to not rebuild a second time 
>> during 'make test' when it just built during 'make'.
>> 
>> That said, the proper recipe should always be:
>> 
>> perl Makefile.PL
>> make
>> make test
>> make install
>> 
>> So my fix allows that to work.  You just need the 'make' step.
>> 
>
> I'm finding on linux (at least) that, with PDL-2.4.3_03, 'make install' is 
> still repeating the 'make' step (or a large portion of it).
>
> And I would not be comfortable with a final release that allows 'make test' 
> to run even if there's no blib in existence. The usual thing is that, if 
> 'make test' is run, and there's no blib in existence, then 'make' is run, 
> followed automatically by 'make test'.
>
> Doug, you've made some progress here. I've had a look at this problem a 
> couple of times and haven't been able to get anywhere with it at all (but 
> don't let that swell your head - I specialise in ignorance wrt makefiles :-)
> However, I think we still need to go those extra few yards, and come up with 
> a solution that does *everything* right.
>
> Doug, do you know if the answer to the problem lies solely with the top-level 
> Makefile.PL ? Or could there be other Makefile.PL's contributing to the 
> problem ?
>
> Cheers,
> Rob
>
>
>

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to