[PATCH] Issues with SMOKE and nmake -i distclean for win32.

[email protected] ("Orton, Yves")
Newsgroups perl.daily-build
Message-ID <71B318898201D311845C0008C75DAD1C07B78AD8@defra1ex2>
Hi All.

Ive been trying to get smoke testing set up on W2K box using the .NET (VDS
7) tools.

But ive been having some problems getting it configured and set up properly.

First off is the "distclean" part of the perl makefile.  It is full of stuff
like this:

	-if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
	-rmdir /s $(LIBDIR)\IO

So the first line will recursively delete $(LIBDIR)\IO without any questions
being asked, but only if the directory already exists.

The second line will do the same, but sit and wait for permission from the
user. In other words it needs the /q flag as well for non-interactive
running.

I cant really see why these pairs exist.  If the directory exists it will be
forcably and quietly removed.  If it doesnt exist or after it has already
been removed it will be attempted to be deleted in an interactive form. !?!

Now possibly the if exist stuff should really be calling del /s /q /f
(recurse, quiet, force deletion even if readonly) instead of rmdir, and then
the rmdir should really be called with the /q option (quiet mode) and the /s
option (recurse) so that it doesnt ask annoying questions.

Also in the distclean section I noticed the following two lines:

	-del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
....
	-del /s *.def Makefile Makefile.old

These are the only examples of del being called with the /s option (recurse)
and _not_ the /f option (force deltion of readonly).  This means that an
access denied error is generated for at least a few files:

   del /s *.lib *.map *.pdb *.ilk *.bs *.obj .exists pm_to_blib
   E:\Smoke\source\lib\Net\ChangeLog.libnet
   Access is denied.
   E:\Smoke\source\lib\Net\README.libnet
   Access is denied.

I dont know if these files should _normally_ be left, but it would seem that
since a rsynch is done immediately after the distclean under the smoke tools
the /f would make sense. (But if it isnt being used under smoke testing then
maybe not...)

For the second deletion line I get an error 
        del /s *.def Makefile Makefile.old
Could Not Find E:\Smoke\source\ext\*.def

Which suggests to me that perhaps the /s is in fact a mistake and should be
a /f instead. Im not really sure though.

Anyway, ive patched the makefile to remove the double rmdir statements, but
I decided on the side of caution and did not change the del statements.  The
patch is attached. I have no idea how this patch would effect things on a
non NT machine. Also its worth considering that command extensions which are
standard on W2k (and optional or non existant elsewhere) may change various
commands semantics. For instance the del documentation says:

	E:\Smoke\work>del /?
	Deletes one or more files.
	
	DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
	ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
	
	  names         Specifies a list of one or more files or
directories.
	                Wildcards may be used to delete multiple files. If a
	                directory is specified, all files within the
directory
	                will be deleted.
	
	  /P            Prompts for confirmation before deleting each file.
	  /F            Force deleting of read-only files.
	  /S            Delete specified files from all subdirectories.
	  /Q            Quiet mode, do not ask if ok to delete on global
wildcard
	  /A            Selects files to delete based on attributes
	  attributes    R  Read-only files            S  System files
	                H  Hidden files               A  Files ready for
archiving
	                -  Prefix meaning not
	
	If Command Extensions are enabled DEL and ERASE change as follows:
	
	The display semantics of the /S switch are reversed in that it shows
	you only the files that are deleted, not the ones it could not find.

So if this patch isnt applied to the main source tree then what is the best
way to make sure that the smoke testing isnt interrupted? Should i set up a
patchperl.bat that will automatically apply this patch?

My second issue has to do with the smoke testing. It wasnt really clear to
me how to get this set up properly on win32 without using GCC.  I did some
minor changes to the smokew32.bat so that I could see what was happening,
which I have attached as well as the smokew32.cfg I am using.

The problem is that in the logfile I am getting things like the results at
the bottom of the mail. (the first line was a sanity check to see what the
batch file was doing.)  I dont think that these are correct results and
would very much appreciate any advice or guidance to getting this correct. 

Also, Ive been wondering why we are using a scary batchfile to do stuff that
perl does better.  Is the expectation that smoke testing will occur on a
system that does not have an older stable perl installed?  Is this a valid
expectation? On the system i will do my smoke testing on I will have AS Perl
633 installed already...

Regards,
Yves
ps Sorry that this is so long.... And thanks in advance for any help. 
---
perl E:\smoke\work\mktest.pl -m nmake -c MSVC60 -v 1
E:\smoke\work\smokew32.cfg "" "osvers=5.0 W2000Pro" 

Configuration: -Dusedevel -DINST_DRV=E:
-DINST_TOP=$(INST_DRV)\smoke\bleadperl
----------------------------------------------------------------------------
--
Make distclean ...
Copy Policy.sh ...
Configure ..../Configure -Dusedevel -DINST_DRV=E:
-DINST_TOP=$(INST_DRV)\smoke\bleadperl -des
Make headers ...
Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'regen_headers'
Stop.

Make ...
Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation.  All rights reserved.

Could Not Find E:\Smoke\source\win32\config.h
Can't open W2000Pro: No such file or directory at config_sh.PL line 96.
Can't open config_args=-Dusedevel: No such file or directory at config_sh.PL
line 96.
Can't open INST_DRV=E:: Invalid argument at config_sh.PL line 96.
Can't open INST_TOP=E:\smoke\bleadperl: Invalid argument at config_sh.PL
line 96.
Can't open INST_VER=: No such file or directory at config_sh.PL line 96.
Can't open INST_ARCH=: No such file or directory at config_sh.PL line 96.
Can't open archname=MSWin32-x86-perlio: No such file or directory at
config_sh.PL line 96.
Can't open cc=cl: No such file or directory at config_sh.PL line 96.
Can't open ld=link: No such file or directory at config_sh.PL line 96.
Can't open ccflags=-nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE
-DNO_STRICT   -DUSE_PERLIO -DPERL_MSVCRT_READFIX: No such file or directory
at config_sh.PL line 96.
Can't open [email protected]: No such file or directory at
config_sh.PL line 96.
Can't open d_crypt=undef: No such file or directory at config_sh.PL line 96.
Can't open d_mymalloc=undef: No such file or directory at config_sh.PL line
96.
Can't open libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
odbccp32.lib msvcrt.lib: No such file or directory at config_sh.PL line 96.
Can't open incpath=\include: No such file or directory at config_sh.PL line
96.
Can't open libperl=perl59.lib: No such file or directory at config_sh.PL
line 96.
Can't open libpth=\lib;: No such file or directory at config_sh.PL line 96.
Can't open libc=msvcrt.lib: No such file or directory at config_sh.PL line
96.
Can't open make=nmake: No such file or directory at config_sh.PL line 96.
Can't open use5005threads=undef: No such file or directory at config_sh.PL
line 96.
Can't open useithreads=undef: No such file or directory at config_sh.PL line
96.
Can't open usethreads=undef: No such file or directory at config_sh.PL line
96.
Can't open usemultiplicity=undef: No such file or directory at config_sh.PL
line 96.
Can't open useperlio=define: No such file or directory at config_sh.PL line
96.
Can't open LINK_FLAGS=-nologo -nodefaultlib -release
-libpath:"E:\smoke\bleadperl\lib\CORE"  -machine:x86: Invalid argument at
config_sh.PL line 96.
Can't open optimize=-MD -DNDEBUG -O1: No such file or directory at
config_sh.PL line 96.
Running config_h.PL
Writing config.h
config.h has changed
USE_THREADS PERL_INC_VERSION_LIST USE_STDIO_PTR _CONSOLE USE_STDIO_BASE
PERL_PM_APIVERSION USE_DYNAMIC_LOADING PERL_MSVCRT_READFIX USE_PERLIO
PERL_TARGETARCH WIN32 NO_STRICT USE_STRUCT_COPY NDEBUG PERL_IMPLICIT_CONTEXT
PERL_XS_APIVERSION
cl : Command line warning D4025 : overriding '/DPERLDLL' with '/UPERLDLL'
Terminating on signal SIGINT(2)
NMAKE : fatal error^C U1058: NMAKE : fatal error U1077: terminated by user
Stop.
win32makefile.distclean.patch (application/octet-stream, 1.5 KB)
--- ..\source\win32\makefile	2002-09-04 14:57:09.000000000 +0200
+++ makefile.new	2002-10-02 14:03:43.000000000 +0200
@@ -1029,22 +1029,14 @@
 	-del /f $(LIBDIR)\XS\Typemap.pm
 	-del /f $(LIBDIR)\Unicode\Normalize.pm
 	-if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
-	-rmdir /s $(LIBDIR)\IO
 	-if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
-	-rmdir /s $(LIBDIR)\B
 	-if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
-	-rmdir /s $(LIBDIR)\Data
 	-if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
 	-if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
-	-rmdir /s $(LIBDIR)\Digest
 	-if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-	-rmdir /s $(LIBDIR)\MIME
 	-if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
-	-rmdir /s $(LIBDIR)\List
 	-if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
-	-rmdir /s $(LIBDIR)\Scalar
 	-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-	-rmdir /s $(LIBDIR)\XS
 	cd $(PODDIR)
 	-del /f *.html *.bat checkpods \
 	    perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
@@ -1076,9 +1068,7 @@
 	-del /s *.def Makefile Makefile.old
 	cd ..\win32
 	-if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
-	-rmdir /s $(AUTODIR)
 	-if exist $(COREDIR) rmdir /s /q $(COREDIR)
-	-rmdir /s $(COREDIR)
 
 install : all installbare installhtml
 
@@ -1155,7 +1145,6 @@
 	-@$(DEL) $(PERLDLL)
 	-@$(DEL) $(CORE_OBJ)
 	-if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
-	-rmdir /s $(MINIDIR)
 	-@$(DEL) $(WIN32_OBJ)
 	-@$(DEL) $(DLL_OBJ)
 	-@$(DEL) $(X2P_OBJ)
smokew32.cfg (application/octet-stream, 1.1 KB) - not displayed
smoke32.tab (application/octet-stream, 4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.