Nicholas Clark wrote:

>On Tue, Jun 01, 2004 at 01:00:00AM +0100, Steve Hay wrote:
>  
>
>>Automated smoke report for 5.9.2 patch 22881
>>TANGAROA.uk.radan.com:  Intel(R) Pentium(R) 4 CPU 2.00GHz(~1992 MHz) (x86/1 cpu)
>>    on        MSWin32 - WinXP/.Net SP1
>>    using     cl version 12.00.8804
>>    smoketime 1 hour 19 minutes (average 2 minutes 29.156 seconds)
>>
>>Summary: FAIL(M)
>>    
>>
>Oops. Looks like I didn't get the win32 Makefile correct in my utf8 changes.
>This isn't something that I'm able to fix myself. Sorry.
>
The attached patch fixes things under VC++/nmake, and gets things 
working under MinGW/dmake too, but the latter is not perfect...

win32/Makefile and win32/makefile.mk currently contain this:

$(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
    cd ..\lib\unicore
    ..\..\$(MINIPERL) -I..\..\lib mktables
    cd ..\..\win32

but $(MINIPERL) is ..\miniperl.exe, so in theory just changing the above to:

$(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
    cd ..\lib\unicore
    ..\$(MINIPERL) -I.. mktables
    cd ..\..\win32

should be fine.  This worked OK in Makefile using VC++/nmake, but when I 
did the same in makefile.mk and tried it using MinGW/dmake it didn't 
work.  It seems that with dmake, each line of the "recipe" for a given 
target is self-contained, so the initial "cd ..\lib\unicore" only has 
effect for the rest of that line (nothing else, in this case) and then 
you're back in the win32 directory.

The following alternative (a style used elsewhere) should therefore be fine:

$(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
    cd ..\lib\unicore && ..\$(MINIPERL) -I.. mktables

This is also fine with nmake, but causes dmake to run mktables 7 times!

Presumably it's doing it once for each of the $(UNIDATAFILES).  The 
following makefile seems to confirm this:

FILES = one.txt two.txt
all : $(FILES)
$(FILES) :
    echo One>one.txt
    echo Two>two.txt

Running that with dmake produces this output:

echo One>one.txt
echo Two>two.txt
echo One>one.txt
echo Two>two.txt

Running the same makefile with nmake just produces:

echo One>one.txt
echo Two>two.txt

Likewise with GNU make.

Running mktables 7 times is better than not running it at all, but there 
must be a way to fix it for dmake.  Anyone know how?

- Steve


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

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.
--- win32/Makefile.orig 2004-05-31 20:26:58.000000000 +0100
+++ win32/Makefile      2004-06-01 15:22:54.566968200 +0100
@@ -458,7 +458,8 @@
                   ..\lib\unicore\PVA.pl
 
 # Directories of Unicode data files generated by mktables
-UNIDATADIRS     = ..\lib\unicore\To ..\lib\unicore\lib
+UNIDATADIR1    = ..\lib\unicore\To
+UNIDATADIR2    = ..\lib\unicore\lib
 
 PERLEXE_ICO    = .\perlexe.ico
 PERLEXE_RES    = .\perlexe.res
@@ -1156,9 +1157,8 @@
        $(RCOPY) ..\lib $(INST_LIB)\*.*
 
 $(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
-       cd ..\lib\unicore
-       ..\..\$(MINIPERL) -I..\..\lib mktables
-       cd ..\..\win32
+       cd ..\lib\unicore && \
+       ..\$(MINIPERL) -I.. mktables
 
 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES)
        $(XCOPY) $(MINIPERL) ..\t\$(NULL)
@@ -1193,6 +1193,8 @@
        $(PERLEXE) -I..\lib harness
        cd ..\win32
 
+# the doubled rmdir calls are needed because older cmd shells
+# don't understand /q
 _clean :
        [EMAIL PROTECTED](DEL) miniperlmain$(o)
        [EMAIL PROTECTED](DEL) $(MINIPERL)
@@ -1207,8 +1209,12 @@
        [EMAIL PROTECTED](DEL) $(CORE_OBJ)
        -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
        -if exist $(MINIDIR) rmdir /s $(MINIDIR)
-       -if exist $(UNIDATADIRS) rmdir /s $(UNIDATADIRS)
+       -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
+       -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1)
+       -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
+       -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2)
        [EMAIL PROTECTED](DEL) $(UNIDATAFILES)
+       [EMAIL PROTECTED](DEL) $(WIN32_OBJ)
        [EMAIL PROTECTED](DEL) $(DLL_OBJ)
        [EMAIL PROTECTED](DEL) $(X2P_OBJ)
        [EMAIL PROTECTED](DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
--- win32/makefile.mk.orig      2004-05-31 20:26:58.000000000 +0100
+++ win32/makefile.mk   2004-06-01 15:23:32.598705000 +0100
@@ -581,7 +581,8 @@
                   ..\lib\unicore\PVA.pl
 
 # Directories of Unicode data files generated by mktables
-UNIDATADIRS     = ..\lib\unicore\To ..\lib\unicore\lib
+UNIDATADIR1    = ..\lib\unicore\To
+UNIDATADIR2    = ..\lib\unicore\lib
 
 PERLEXE_ICO    = .\perlexe.ico
 PERLEXE_RES    = .\perlexe.res
@@ -1192,6 +1193,8 @@
 # Note that the pod cleanup in this next section is parsed (and regenerated
 # by pod/buildtoc so please check that script before making changes here
 
+# the doubled rmdir calls are needed because older cmd shells
+# don't understand /q
 distclean: realclean
        -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
                $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
@@ -1288,9 +1291,8 @@
        $(RCOPY) ..\lib $(INST_LIB)\*.*
 
 $(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
-       cd ..\lib\unicore
-       ..\..\$(MINIPERL) -I..\..\lib mktables
-       cd ..\..\win32
+       cd ..\lib\unicore && \
+       ..\$(MINIPERL) -I.. mktables
 
 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
        $(XCOPY) $(MINIPERL) ..\t\$(NULL)
@@ -1331,6 +1333,8 @@
 .ENDIF
        cd ..\t && $(PERLEXE) -I..\lib harness
 
+# the doubled rmdir calls are needed because older cmd shells
+# don't understand /q
 _clean :
        [EMAIL PROTECTED] miniperlmain$(o)
        [EMAIL PROTECTED] $(MINIPERL)
@@ -1345,7 +1349,10 @@
        [EMAIL PROTECTED] $(CORE_OBJ)
        -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
        -if exist $(MINIDIR) rmdir /s $(MINIDIR)
-       -if exist $(UNIDATADIRS) rmdir /s $(UNIDATADIRS)
+       -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
+       -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1)
+       -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
+       -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2)
        [EMAIL PROTECTED] $(UNIDATAFILES)
        [EMAIL PROTECTED] $(WIN32_OBJ)
        [EMAIL PROTECTED] $(DLL_OBJ)

Reply via email to