Michael G Schwern wrote:

>There's a lot of redundant code in MakeMaker because there's no common idiom
>for "cd into this directory and run this command".
>
>Most can handle this:
>cd foo && command
>
>But nmake does this:
>cd foo
>command
>cd ..
>  
>
Did you mean "nmake on Win95 does this..."?  I see that only MM_Win95 is 
changed (compared to 6.25).  MM_Win32 is unchanged, and the "cd foo && 
command" style works fine on NT/2K/XP.

>And VMS does this:
>startdir = F$Environment("Default")
>Set Default [.foo]
>command
>Set Default 'startdir'
>
>I recently found myself adding code like this to distdir and I'll be damned
>if I'm going to duplicate it three times.  So I wrote a method to generate
>this code for me.  See MM_Any->cd and the implementations in MM_Unix,
>MM_Win95 and MM_VMS.
>
>Now I'm going through and tearing out all the redundancies caused by this
>as I can.  I'm probably going to break something on nmake and VMS in the
>process.  So I need testers.
>
>You can either grab a copy from the repository or get a tarball 
>from this yucky URL.
>http://svn.schwern.org/websvn/listing.php?repname=CPAN&path=%2FCPAN%2FExtUtils-MakeMaker%2Ftrunk%2F&rev=0&sc=0
>
I grabbed the tarball from there and found that it doesn't test on XP 
using nmake.

In basic.t, it completes upto & including test 22 OK, but then starts 
spawning dozens of cmd.exe, nmake.exe and perl.exe processes.  I killed 
it when I had about 60 of each (!).

I cd'd into t/Big-Dummy and manually ran "nmake test" from there (which 
is what I think test 23 is doing).  It completes all tests successfully, 
but does so over and over again:

C:\Temp\trunk\t\Big-Dummy>nmake test

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        C:\perl5\bin\perl.exe "-MExtUtils::Command::MM" "-e" 
"test_harness(0, 'blib\lib', 'blib\arch')" t\compile.t
t\compile....ok
All tests successful.
Files=1, Tests=2,  0 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)
        C:\perl5\bin\perl.exe "-MExtUtils::Command::MM" "-e" 
"test_harness(0, 'blib\lib', 'blib\arch')" t\compile.t
t\compile....ok
All tests successful.
[etc]

Each iteration adds a new cmd.exe + nmake.exe + perl.exe to my process list.

The problem seems to lie in the test target of t/Big-Dummy's Makefile.  
6.25 (which works OK) has this:

test :: $(TEST_TYPE)
    $(NOECHO) cd Liar && $(TEST_F) $(FIRST_MAKEFILE) && $(MAKE) test 
$(PASTHRU)

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

whereas the svn tarball has this:

test :: $(TEST_TYPE)
    $(NOECHO) $(ABSPERLRUN)  -e "if( -f '$(FIRST_MAKEFILE)' ) { \
    system '$(MAKE) test $(MACROSTART)$(PASTHRU)$(MACROEND)' \
}"

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

Running "nmake test_dynamic" in the svn version's t/Big-Dummy works 
fine: the Big-Dummy tests are run once only.

Any idea why the test target came out differently in this way?

- Steve


------------------------------------------------
Radan Computational Ltd.

We would like to take this opportunity to wish all our customers, suppliers and 
colleagues seasons greetings.  We will not be sending corporate greetings 
cards this year.  Instead, we will be making a donation to charity.

The information contained in this message and any files transmitted with it are 
confidential and intended for the addressee(s) only.  If you have received this 
message in error or there are any problems, please notify the sender 
immediately.  The unauthorized use, disclosure, copying or alteration of this 
message is strictly forbidden.  Note that any views or opinions presented in 
this email are solely those of the author and do not necessarily represent 
those of Radan Computational Ltd.  The recipient(s) of this message should 
check it and any attached files for viruses: Radan Computational will accept no 
liability for any damage caused by any virus transmitted by this email.

Reply via email to