threads-shared 1.03 - Changes, Makefile.PL
[p5sagit/p5-mst-13.2.git] / win32 / Makefile
index 2a14e97..b14f311 100644 (file)
@@ -454,6 +454,7 @@ LIBBASEFILES    = $(LIBBASEFILES) bufferoverflowU.lib
 # we add LIBC here, since we may be using PerlCRT.dll
 LIBFILES       = $(LIBBASEFILES) $(LIBC)
 
+#EXTRACFLAGS   = -nologo -GF -W4 -wd4127 -wd4706
 EXTRACFLAGS    = -nologo -GF -W3
 CFLAGS         = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
                $(PCHFLAGS) $(OPTIMIZE)
@@ -513,6 +514,7 @@ GLOBEXEBUILD         =
 !ENDIF
 
 # Unicode data files generated by mktables
+FIRSTUNIFILE     = ..\lib\unicore\Canonical.pl
 UNIDATAFILES    = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
                   ..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \
                   ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
@@ -545,7 +547,6 @@ UTILS               =                       \
                ..\utils\pstruct        \
                ..\utils\h2xs           \
                ..\utils\perldoc        \
-               ..\utils\perlcc         \
                ..\utils\perlivp        \
                ..\utils\libnetcfg      \
                ..\utils\enc2xs         \
@@ -773,6 +774,7 @@ UNICODENORMALIZE    = $(EXTDIR)\Unicode\Normalize\Normalize
 MATHBIGINTFASTCALC     = $(EXTDIR)\Math\BigInt\FastCalc\FastCalc
 COMPRESSZLIB           = $(EXTDIR)\Compress\Zlib\Zlib
 WIN32_DIR              = ext\Win32
+WIN32APIFILE           = ext\Win32API\File\File
 
 SOCKET_DLL             = $(AUTODIR)\Socket\Socket.dll
 FCNTL_DLL              = $(AUTODIR)\Fcntl\Fcntl.dll
@@ -808,6 +810,7 @@ UNICODENORMALIZE_DLL        = $(AUTODIR)\Unicode\Normalize\Normalize.dll
 MATHBIGINTFASTCALC_DLL = $(AUTODIR)\Math\BigInt\FastCalc\FastCalc.dll
 COMPRESSZLIB_DLL       = $(AUTODIR)\Compress\Zlib\Zlib.dll
 WIN32_DLL              = $(AUTODIR)\Win32\Win32.dll
+WIN32APIFILE_DLL       = $(AUTODIR)\Win32API\File\File.dll
 
 EXTENSION_C    =               \
                $(SOCKET).c     \
@@ -843,7 +846,8 @@ EXTENSION_C =               \
                $(UNICODENORMALIZE).c   \
                $(MATHBIGINTFASTCALC).c \
                $(COMPRESSZLIB).c       \
-               $(WIN32_DIR).c
+               $(WIN32_DIR).c  \
+               $(WIN32APIFILE).c
 
 EXTENSION_DLL  =               \
                $(SOCKET_DLL)   \
@@ -879,7 +883,8 @@ EXTENSION_DLL       =               \
                $(UNICODENORMALIZE_DLL) \
                $(MATHBIGINTFASTCALC_DLL)       \
                $(COMPRESSZLIB_DLL)     \
-               $(WIN32_DLL)
+               $(WIN32_DLL)    \
+               $(WIN32APIFILE_DLL)
 
 CFG_VARS       =                                       \
                "INST_DRV=$(INST_DRV)"                  \
@@ -914,9 +919,13 @@ CFG_VARS   =                                       \
 #
 
 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
-       $(X2P) Extensions
+       $(X2P) MakePPPort Extensions
        @echo   Everything is up to date. '$(MAKE_BARE) test' to run test suite.
 
+reonly : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
+       $(X2P) Extensions_reonly
+       @echo   Perl and 're' are up to date.
+
 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
 
 #------------------------------------------------------------
@@ -1069,12 +1078,25 @@ $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
        copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
 
+MakePPPort: $(MINIPERL) $(CONFIGPM)
+       $(MINIPERL) -I..\lib ..\mkppport
+
+MakePPPort_clean:
+       -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\mkppport --clean
+
 #-------------------------------------------------------------------------------
 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
+       $(XCOPY) ..\*.h $(COREDIR)\*.*
        $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic
        $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic
 
+Extensions_reonly: buildext.pl $(PERLDEP) $(CONFIGPM)
+       $(XCOPY) ..\*.h $(COREDIR)\*.*
+       $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic +re
+       $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic +re
+
 Extensions_static : buildext.pl
+       $(XCOPY) ..\*.h $(COREDIR)\*.*
        $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static
        $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static
        $(MINIPERL) -I..\lib buildext.pl --list-static-libs > Extensions_static
@@ -1186,6 +1208,8 @@ distclean: realclean
        -del /f $(LIBDIR)\Unicode\Normalize.pm
        -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
        -del /f $(LIBDIR)\Win32.pm
+       -del /f $(LIBDIR)\Win32API\File.pm
+       -del /f $(LIBDIR)\Win32API\File\cFile.pc
        -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
        -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
        -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
@@ -1201,6 +1225,7 @@ distclean: realclean
        -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
        -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
        -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
+       -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
        -cd $(PODDIR) && del /f *.html *.bat checkpods \
            perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
            perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
@@ -1216,7 +1241,7 @@ distclean: realclean
            pod2html pod2latex pod2man pod2text pod2usage \
            podchecker podselect
        -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
-           perldoc perlivp dprofpp perlcc libnetcfg enc2xs piconv cpan *.bat \
+           perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \
            xsubpp instmodsh prove ptar ptardiff shasum corelist config_data
        -cd ..\x2p && del /f find2perl s2p psed *.bat
        -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
@@ -1252,7 +1277,7 @@ inst_lib : $(CONFIGPM)
 
 $(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
        cd ..\lib\unicore && \
-       ..\$(MINIPERL) -I.. mktables
+       ..\$(MINIPERL) -I.. mktables -check $@ $(FIRSTUNIFILE)
 
 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES)
        $(XCOPY) $(MINIPERL) ..\t\$(NULL)
@@ -1273,6 +1298,14 @@ test : test-prep
        $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
        cd ..\win32
 
+test-reonly : reonly utils
+       $(XCOPY) $(PERLEXE) ..\t\$(NULL)
+       $(XCOPY) $(PERLDLL) ..\t\$(NULL)
+       $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
+       cd ..\t
+       $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\b \breg \bre\b $(EXTRA)
+       cd ..\win32
+       
 test-notty : test-prep
        set PERL_SKIP_TTY_TEST=1
        cd ..\t
@@ -1315,7 +1348,7 @@ _clean :
 
 clean : Extensions_clean _clean
 
-realclean : Extensions_realclean _clean
+realclean : Extensions_realclean MakePPPort_clean _clean
 
 # Handy way to run perlbug -ok without having to install and run the
 # installed perlbug. We don't re-run the tests here - we trust the user.