Re: [Module::Build] ./Build on Win98
Status: Beta
Brought to you by:
kwilliams
|
From: Dr B. <gr...@mo...> - 2006-02-25 07:43:23
|
On Fri, 24 Feb 2006, Randy W. Sims wrote:
> >D:\greg\Module-Build> Build realclean
> >Deleting _build
> >Deleting Build
> >Deleting Build.bat
> >Batch file missing
> It's taking the wrong path here. M::B is deleting 'Build.bat' where it
> should be letting it delete itself. We know this method of self-deletion
> works because it was proved in a previous attempt. The only issue here
> is that the created 'Build.bat' is not correctly passing in the
> --build_bat argument. To prove this you should be able to:
> perl Build.PL
> Build --build_bat realclean
D:\greg\Module-Build>Build --build_bat realclean
Deleting _build
Deleting Build
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.52 MB free
> and get a successful run without error about missing batch file.
OK.
> If you run:
> perl Build.PL
> and then look at the top of the resulting 'Build.bat', you should see
> the following lines:
> if "%OS%" == "Windows_NT" goto WinNT
> perl -x -S "%0" "--build_bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
> goto endofperl
> :WinNT
> perl -x -S "%0" "--build_bat" %*
> I'd like to know if the resulting 'Build.bat' differs on Win9x. I
> suspect not. Otherwise the invokation of perl from the batch file would
> cause errors or different behavior.
@rem = '--*-Perl-*--
@echo off
if "%OS%" == "Windows_NT" goto WinNT
perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
:WinNT
perl -x -S "%0" --build_bat 0" --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
goto endofperl
@rem ';
#!perl
#line 15
They are not the same.
But if I substitute
perl -x -S "%0" "--build_bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
for the invocation line, Build realclean deletes Build.bat,
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
BUILD 1,472 02-25-06 15:18 Build
BUILD BAT 1,943 02-25-06 15:18 Build.bat
3 file(s) 6,006 bytes
0 dir(s) 13,721.28 MB free
D:\greg\Module-Build>Build realclean
Deleting _build
Deleting Build
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.52 MB free
D:\greg\Module-Build>
and Build --build_bat realclean does too.
D:\greg\Module-Build>Build --build_bat realclean
Deleting _build
Deleting Build
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.52 MB free
D:\greg\Module-Build>
> At one time those quotes around the --build_bat arg seemed necessary,
> but it may be the cause of the problem; Although, I don't see why they
> should matter one way or the other. I've removed those quotes, and
> instrumented the code to see if I can find out where the argument is going.
> Care to give it another spin?
> <http://thepierianspring.org/perl/Module-Build.tar.gz>
> perl Build.PL
> Build realclean
> if exist Build.bat echo profanity
D:\greg\Module-Build>Build realclean
Deleting _build
Deleting Build
########################################
build_bat: 0
$VAR1 = 'ARGV';
$VAR2 = [];
########################################
Deleting Build.bat
Batch file missing
D:\greg\Module-Build>Build --build_bat realclean
Deleting _build
Deleting Build
########################################
build_bat: 1
$VAR1 = 'ARGV';
$VAR2 = [];
########################################
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.61 MB free
And with the same changes to the perl invocation args as above:
D:\greg\Module-Build>Build realclean
Deleting _build
Deleting Build
########################################
build_bat: 1
$VAR1 = 'ARGV';
$VAR2 = [];
########################################
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.61 MB free
And the same with Build --build_bat realclean
So it seems that the behavior is the same between the 2 versions.
--
Dr Bean
|