Fix [perl #24269] socket() call uses non-IFS providers
[p5sagit/p5-mst-13.2.git] / win32 / makefile.mk
index 8aca918..bcb5e98 100644 (file)
@@ -89,14 +89,11 @@ USE_LARGE_FILES *= define
 # Visual C++ > 2.x and < 6.x
 #CCTYPE                *= MSVC
 # Visual C++ >= 6.x
-CCTYPE         *= MSVC60
+#CCTYPE                *= MSVC60
 # Borland 5.02 or later
 #CCTYPE                *= BORLAND
-# mingw32+gcc-2.95.2 or better
-#CCTYPE                *= GCC
-# Uncomment this if you are using the latest MinGW release (2.0.0)
-# with gcc3.2
-#USE_GCC_V3_2  *= define
+# MinGW with gcc-2.95.2 or later
+CCTYPE         *= GCC
 
 #
 # uncomment this if your Borland compiler is older than v5.4.
@@ -293,7 +290,7 @@ ARCHNAME    !:= $(ARCHNAME)-thread
 
 # VC 6.0 can load the socket dll on demand.  Makes the test suite
 # run in about 10% less time.
-DELAYLOAD      *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
+DELAYLOAD      *= -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
 
 .IF "$(CFG)" == "Debug"
 .ELSE
@@ -379,9 +376,6 @@ LINK_FLAGS  += -L"$(CCLIBDIR)\Release"
 
 CC             = gcc
 LINK32         = g++
-.IF "$(USE_GCC_V3_2)" == "define"
-LINK32         = g++
-.END
 LIB32          = ar rc
 IMPLIB         = dlltool
 RSC            = windres
@@ -406,7 +400,7 @@ LIBC                = -lmsvcrt
 LIBFILES       = $(CRYPT_LIB) $(LIBC) \
                  -lmoldname -lkernel32 -luser32 -lgdi32 \
                  -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
-                 -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \
+                 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
                  -lwinmm -lversion -lodbc32
 
 .IF  "$(CFG)" == "Debug"
@@ -490,7 +484,7 @@ BUILDOPT    += -DPERL_MSVCRT_READFIX
 LIBBASEFILES   = $(CRYPT_LIB) \
                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 \
+               netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
                version.lib
 
 # win64 doesn't have some libs
@@ -577,10 +571,12 @@ X2P               = ..\x2p\a2p.exe
 # Unicode data files generated by mktables
 UNIDATAFILES    = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
                   ..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \
-                  ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl
+                  ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
+                  ..\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
@@ -1191,6 +1187,8 @@ utils: $(PERLEXE) $(X2P)
 # 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)
@@ -1286,10 +1284,14 @@ inst_lib : $(CONFIGPM)
        $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
        $(RCOPY) ..\lib $(INST_LIB)\*.*
 
-$(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
-       cd ..\lib\unicore
-       ..\..\$(MINIPERL) -I..\..\lib mktables
-       cd ..\..\win32
+# Move the rule for making $(UNIDATAFILES) into a separate target and leave the
+# actual rule here blank because dmake runs the rule here once for each of the
+# files listed in $(UNIDATAFILES)
+$(UNIDATAFILES) : make_unidatafiles
+
+make_unidatafiles : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
+       cd ..\lib\unicore && \
+       ..\$(MINIPERL) -I.. mktables
 
 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
        $(XCOPY) $(MINIPERL) ..\t\$(NULL)
@@ -1330,6 +1332,8 @@ _test : $(RIGHTMAKE)
 .ENDIF
        cd ..\t && $(PERLEXE) -I..\lib harness
 
+# the doubled rmdir calls are needed because older cmd shells
+# don't understand /q
 _clean :
        -@erase miniperlmain$(o)
        -@erase $(MINIPERL)
@@ -1344,7 +1348,10 @@ _clean :
        -@erase $(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)
        -@erase $(UNIDATAFILES)
        -@erase $(WIN32_OBJ)
        -@erase $(DLL_OBJ)