Title: RE: [PATCH] Makefile distclean for win32 to remove redundant interactive rmdir commands.

On 02 October 2002 23:50 Nicholas Clark said
> On Wed, Oct 02, 2002 at 07:22:02PM +0100, Orton, Yves wrote:
> > 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
>
> I believe that this form distclean target is only in the  win32 Makefile, and
> I'd suspect that no-one actually runs it. Hence the  braindeath you've found
> in it. I'm losing track of whether you mailed this to p5p,  but I think it's
> a reportable bug that ought to be sent to p5p. (And Nick Ing-Simons or
> Sarathy poked until one of them answers)

Ok, well I did send this patch to P5P the first time, but maybe it got lost in the smoke stuff. So im resending it this time as well. Also ive sent this to Sarathy but I couldnt find Nick Ing-Simons email.

To recap the basic issue is that the above pairs are functional equivelents to each other, the exception being that the second (redundant) statment will run in interactive mode, with all the obvious annoyances that causes.  The patch below (and attached) removes these redundancies from the makefile.

Here it is:
#PATCH#############################################################
--- ..\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)
#ENDPATCH##########################################################

> I've no idea how building perl "normally" on win32 works. How many different
> configurations can you choose? (eg things like having  -DDEBUGGING in the
> C compiler flags, using 64 bit integers, using long doubles,
> using (or not using) threads). All the smoke test scripts are trying to do
> for a run is rebuild the same perl source tree with different sets of configuration
> options. I've also no idea of how the smoke is supposed to
> work on win32, or which make it was written for.


Well, based on the makefile I see

USE_MULTI
USE_ITHREADS
USE_IMP_SYS
USE_PERLIO
CFG (for debug)
PERL_MALLOC

As being possible different options. But im pretty new to this all.

Yves

 

Attachment: win32makefile.distclean.patch
Description: Binary data

Reply via email to