Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] add parallelness to win32/GNUmakefile #15047

Closed
p5pRT opened this issue Nov 13, 2015 · 31 comments
Closed

[PATCH] add parallelness to win32/GNUmakefile #15047

p5pRT opened this issue Nov 13, 2015 · 31 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 13, 2015

Migrated from rt.perl.org#126632 (status was 'resolved')

Searchable as RT126632$

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2015

From @bulk88

Created by @bulk88

See attached patches. They are kindda a branch, although I greatly
dislike merge commits. Note the patching of EUMM, I am not sure if I
fixed up all the files correctly for patching /cpan, porting tests
passed for me but IDK if they will pass on someone elses machine.
Reducing the amount of shell callouts for appending to mini config.h,
and adding VC support to gmake are the next steps, but I need to limit
diff sizes for historical reference reasons/debugging, so I am drawing a
line at stopping at this point. gmake looks much more promising in
parallel mode than dmake, less IO and less CPU, and it doesn't suffer
"running out of work" like dmake does. Extensions_normalize always is
launched/run after Extensions finishes with dmake, since
Extensions_normalize and Extensions are at 2 different heights on the
virutal tree and dmake's parallel finding algorithm only looks
horizontally for work to do, not further down/up the tree. With gmake
Extensions_normalize runs as soon as mktables is done and a CPU core
becomes available, so Extensions_normalize always finishes before
Extensions, which is good. Also gmake implements .SUFFIXES so I can tell
gmake to not look for yacc/pascal/fortran/lex source code when doing
implicit pattern match building, and .SUFFIXES allows me to disable the
unused by perl builtin/default rules. I can't remove the default match
suffixes with dmake since there is no .SUFFIXES in dmake, so once a
pattern match rule is created, it can never be deleted (you can rewrite
the recipe line for it, but you can't remove the file suffix from what
is stat-ed on disk). So I think gmake will be my personal favorite
maketool once I get VC perl building on it. Using .SUFFIXES with gmake
(not in any patch above, will do it in the future) total CPU time for
gmake.exe when from 2.3 sec to 1.7 sec CPU for a "gmake all".

Perl Info

Flags:
     category=core
     severity=low

Site configuration information for perl 5.23.5:

Configured by Owner at Sun Oct 25 19:14:27 2015.

Summary of my perl5 (revision 5 version 23 subversion 5) configuration:
   Derived from: 644207b7a8ff7a2b1661c05a7f9ac2df9a5dad91
   Platform:
     osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread
     uname=''
     config_args='undef'
     hint=recommended, useposix=true, d_sigaction=undef
     useithreads=define, usemultiplicity=define
     use64bitint=undef, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 
-D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE 
-D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEXTMODE_SCRIPTS 
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS',
     optimize='-O1 -MD -Zi -DNDEBUG -GL',
     cppflags='-DWIN32'
     ccversion='18.00.31101', gccversion='', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, 
doublekind=3
     d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8, 
longdblkind=0
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, 
Off_t='__int64', lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf 
-ltcg         -libpath:"c:\p523\lib\CORE"         -machine:x86 
"/manifestdependency:type='Win32' 
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' 
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' 
language='*'" -subsystem:console,"5.01"'
     libpth=\lib
     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 ws2_32.lib mpr.lib winmm.lib version.lib 
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
     perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib 
oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib 
version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
     libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl523.lib
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug 
-opt:ref,icf -ltcg         -libpath:"c:\p523\lib\CORE"  -machine:x86 
"/manifestdependency:type='Win32' 
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' 
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' 
language='*'" -subsystem:console,"5.01"'

Locally applied patches:
     uncommitted-changes


@INC for perl 5.23.5:
     C:/p523/site/lib
     C:/p523/lib
     .


Environment for perl 5.23.5:
     HOME (unset)
     LANG (unset)
     LANGUAGE (unset)
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
     PATH=C:\p523\site\bin;C:\p523\bin;C:\Program Files\ActiveState 
Komodo Edit 
9\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program 
Files\TortoiseGit\bin;C:\Program Files\Microsoft Windows Performance 
Toolkit\;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Program 
Files\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program 
Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft 
SDKs\TypeScript\1.0\;C:\Program Files\TortoiseHg\;
     PERL_BADLANG (unset)
     SHELL (unset)


@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2015

From @bulk88

0001-Cache-is_make_type.patch
From 0a9c31fed9356c659cfd4631354732de957f6922 Mon Sep 17 00:00:00 2001
From: Ed J <mohawk2@users.noreply.github.com>
Date: Mon, 19 Jan 2015 00:17:31 +0000
Subject: [PATCH 1/5] Cache is_make_type

---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 19 ++++++++++++++-----
 cpan/ExtUtils-MakeMaker/t/cd.t                 |  2 ++
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
index 570ea72..154f784 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
@@ -202,19 +202,28 @@ Returns true if C<<$self->make>> is the given type; possibilities are:
 
 =cut
 
+my %maketype2true;
+# undocumented - so t/cd.t can still do its thing
+sub _clear_maketype_cache { %maketype2true = () }
+
 sub is_make_type {
     my($self, $type) = @_;
+    return $maketype2true{$type} if defined $maketype2true{$type};
     (undef, undef, my $make_basename) = $self->splitpath($self->make);
-    return 1 if $make_basename =~ /\b$type\b/i; # executable's filename
-    return 0 if $make_basename =~ /\b(dmake|nmake)\b/i; # Never fall through for dmake/nmake
+    return $maketype2true{$type} = 1
+        if $make_basename =~ /\b$type\b/i; # executable's filename
+    return $maketype2true{$type} = 0
+        if $make_basename =~ /\b(dmake|nmake|gmake)\b/i; # Never fall through for dmake/nmake/gmake
     # now have to run with "-v" and guess
     my $redirect = $self->can_redirect_error ? '2>&1' : '';
     my $make = $self->make || $self->{MAKE};
     my $minus_v = `"$make" -v $redirect`;
-    return 1 if $type eq 'gmake' and $minus_v =~ /GNU make/i;
-    return 1 if $type eq 'bsdmake'
+    return $maketype2true{$type} = 1
+        if $type eq 'gmake' and $minus_v =~ /GNU make/i;
+    return $maketype2true{$type} = 1
+        if $type eq 'bsdmake'
       and $minus_v =~ /^usage: make \[-BeikNnqrstWwX\]/im;
-    0; # it wasn't whatever you asked
+    $maketype2true{$type} = 0; # it wasn't whatever you asked
 }
 
 
diff --git a/cpan/ExtUtils-MakeMaker/t/cd.t b/cpan/ExtUtils-MakeMaker/t/cd.t
index 16f6667..67dfd98 100644
--- a/cpan/ExtUtils-MakeMaker/t/cd.t
+++ b/cpan/ExtUtils-MakeMaker/t/cd.t
@@ -26,6 +26,7 @@ my @cd_args = ($dir, "command1", "command2");
 
     {
         local *make = sub { "nmake" };
+        $mm->_clear_maketype_cache;
 
         my @dirs = (File::Spec->updir) x 2;
         my $expected_updir = File::Spec->catdir(@dirs);
@@ -39,6 +40,7 @@ qq{cd $dir
 
     {
         local *make = sub { "dmake" };
+        $mm->_clear_maketype_cache;
 
         ::is $mm->cd(@cd_args),
 qq{cd $dir && command1
-- 
1.9.5.msysgit.1

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2015

From @bulk88

0002-Optimise-is_make_type-RE.patch
From c450a5eda4dfd78cc244aa7b8214e70f2fce5448 Mon Sep 17 00:00:00 2001
From: Ed J <mohawk2@users.noreply.github.com>
Date: Mon, 19 Jan 2015 13:09:09 +0000
Subject: [PATCH 2/5] Optimise is_make_type RE

---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
index 154f784..bd8ab3b 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
@@ -213,7 +213,7 @@ sub is_make_type {
     return $maketype2true{$type} = 1
         if $make_basename =~ /\b$type\b/i; # executable's filename
     return $maketype2true{$type} = 0
-        if $make_basename =~ /\b(dmake|nmake|gmake)\b/i; # Never fall through for dmake/nmake/gmake
+        if $make_basename =~ /\b[gdn]make\b/i; # Never fall through for dmake/nmake/gmake
     # now have to run with "-v" and guess
     my $redirect = $self->can_redirect_error ? '2>&1' : '';
     my $make = $self->make || $self->{MAKE};
-- 
1.9.5.msysgit.1

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2015

From @bulk88

0003-Win32-gmake-needs-SHELL-to-be-specified.patch
From ee7026b2d574e3d97fda23ad92acbb700e795243 Mon Sep 17 00:00:00 2001
From: Sisyphus <sisyphus@cpan.org>
Date: Tue, 30 Dec 2014 12:56:58 +1100
Subject: [PATCH 3/5] Win32 gmake needs SHELL to be specified

Signed-off-by: Ed J <mohawk2@users.noreply.github.com>
---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm  | 17 ++++++++++++++---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm | 11 +++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index 535b1f3..d0e4410 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -317,8 +317,8 @@ sub const_cccmd {
 
 =item const_config (o)
 
-Defines a couple of constants in the Makefile that are imported from
-%Config.
+Sets SHELL if needed, then defines a couple of constants in the Makefile
+that are imported from %Config.
 
 =cut
 
@@ -326,7 +326,8 @@ sub const_config {
 # --- Constants Sections ---
 
     my($self) = shift;
-    my @m = <<"END";
+    my @m = $self->specify_shell(); # Usually returns empty string
+    push @m, <<"END";
 
 # These definitions are from config.sh (via $INC{'Config.pm'}).
 # They may have been overridden via Makefile.PL or on the command line.
@@ -3176,6 +3177,16 @@ MAKE_FRAG
     return $m;
 }
 
+=item specify_shell
+
+Specify SHELL if needed - not done on Unix.
+
+=cut
+
+sub specify_shell {
+  return '';
+}
+
 =item quote_paren
 
 Backslashes parentheses C<()> in command line arguments.
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
index 47ce479..852223b 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
@@ -232,6 +232,17 @@ sub platform_constants {
     return $make_frag;
 }
 
+=item specify_shell
+
+Set SHELL to $ENV{COMSPEC} only if make is type 'gmake'.
+
+=cut
+
+sub specify_shell {
+    my $self = shift;
+    return '' unless $self->is_make_type('gmake');
+    "\nSHELL = $ENV{COMSPEC}\n";
+}
 
 =item constants
 
-- 
1.9.5.msysgit.1

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2015

From @bulk88

0004-backport-EUMM-commits.patch
From bab3f35dd24c0cf28324b418f76b24a195f6e369 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Tue, 10 Nov 2015 00:57:55 -0500
Subject: [PATCH 4/5] backport EUMM commits

-commit "Cache is_make_type" and "Optimise is_make_type RE" stops 40
 executions of "gmake.exe -v" process for each Makefile.PL run, these 40
 make process launches make it it very difficult to debug make_ext.pl
 and the make tool with a system call logger, see Perl RT #123440 ticket
 for details

-commit "Win32 gmake needs SHELL to be specified" allows Win32 perl to be
 built with gmake, if msysgit is in the PATH env var, without this patch
 gmake will use bash as the shell instead of cmd.exe and no EUMM modules
 can be built during a Win32 perl build, since bash and cmd.exe command
 line strings are not compatible with each other, see Perl RT #123440
 ticket for details
---
 AUTHORS                                                         | 1 +
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm              | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm                 | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm             | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm                      | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm                 | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm               | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm               | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm                | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm                 | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm                 | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm                | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm                | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm                      | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm               | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm        | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod          | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod     | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm       | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm             | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm              | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm                 | 2 +-
 t/porting/customized.dat                                        | 4 ++--
 32 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index ebd9222..3acc6cf 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -371,6 +371,7 @@ Duncan Findlay			<duncf@debian.org>
 E. Choroba			<choroba@cpan.org>
 Ed Avis				<eda@waniasset.com>
 Ed J				<etj@cpan.org>
+Ed J				<mohawk2@users.noreply.github.com>
 Ed Mooring			<mooring@Lynx.COM>
 Ed Santiago			<esm@pobox.com>
 Eddy Tan			<eddy.net@gmail.com>
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
index 6c1898d..9184471 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
@@ -10,7 +10,7 @@ our @ISA = qw(Exporter);
 
 our @EXPORT  = qw(test_harness pod2man perllocal_install uninstall
                   warn_if_old_packlist test_s cp_nonempty);
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 my $Is_VMS = $^O eq 'VMS';
 
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
index f856657..3bb49d2 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
@@ -2,7 +2,7 @@ package ExtUtils::Liblist;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use File::Spec;
 require ExtUtils::Liblist::Kid;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
index c56f539..43d554e 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
@@ -11,7 +11,7 @@ use 5.006;
 
 use strict;
 use warnings;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use ExtUtils::MakeMaker::Config;
 use Cwd 'cwd';
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
index c58e0a5..fa5f72c 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
@@ -3,7 +3,7 @@ package ExtUtils::MM;
 use strict;
 use ExtUtils::MakeMaker::Config;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::Liblist;
 require ExtUtils::MakeMaker;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
index 2e0739d..ec3a2fc 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_AIX;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
index bd8ab3b..129ad9e 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_Any;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use Carp;
 use File::Spec;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
index 847d833..801b035 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
@@ -26,7 +26,7 @@ require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
 
 our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 
 =item os_flavor
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
index 72cccb8..a9331ff 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
@@ -9,7 +9,7 @@ require ExtUtils::MM_Unix;
 require ExtUtils::MM_Win32;
 our @ISA = qw( ExtUtils::MM_Unix );
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 
 =head1 NAME
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
index ab3e9d8..c6ffc59 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
@@ -2,7 +2,7 @@ package ExtUtils::MM_DOS;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
index 8d189b5..cc52f1d 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
@@ -7,7 +7,7 @@ BEGIN {
     our @ISA = qw( ExtUtils::MM_Unix );
 }
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 
 =head1 NAME
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
index 27983f4..820ffd1 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
@@ -2,7 +2,7 @@ package ExtUtils::MM_MacOS;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 sub new {
     die 'MacOS Classic (MacPerl) is no longer supported by MakeMaker';
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
index a236d11..0b89a15 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
@@ -22,7 +22,7 @@ use strict;
 use ExtUtils::MakeMaker::Config;
 use File::Basename;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Win32;
 our @ISA = qw(ExtUtils::MM_Win32);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
index 2730ee3..2c64ac4 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
@@ -5,7 +5,7 @@ use strict;
 use ExtUtils::MakeMaker qw(neatvalue);
 use File::Spec;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
index 588c7ee..71c4bd5 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_QNX;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
index 9ff061a..2350482 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_UWIN;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index d0e4410..e24a61b 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -15,7 +15,7 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue);
 
 # If we make $VERSION an our variable parse_version() breaks
 use vars qw($VERSION);
-$VERSION = '7.10';
+$VERSION = '7.10_01';
 $VERSION = eval $VERSION;  ## no critic [BuiltinFunctions::ProhibitStringyEval]
 
 require ExtUtils::MM_Any;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
index 9b2f964..fab18df 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
@@ -15,7 +15,7 @@ BEGIN {
 
 use File::Basename;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
index 77fe4f9..57d5e32 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_VOS;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
index 852223b..1c6921c 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
@@ -27,7 +27,7 @@ use ExtUtils::MakeMaker qw( neatvalue );
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
 our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 $ENV{EMXSHELL} = 'sh'; # to run `commands`
 
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
index f36e23f..2c31d7c 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
@@ -2,7 +2,7 @@ package ExtUtils::MM_Win95;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Win32;
 our @ISA = qw(ExtUtils::MM_Win32);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
index a100b0b..3973e37 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
@@ -3,7 +3,7 @@ package ExtUtils::MY;
 use strict;
 require ExtUtils::MM;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 our @ISA = qw(ExtUtils::MM);
 
 {
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
index 4f9d46f..f9fb8fe 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
@@ -24,7 +24,7 @@ my %Recognized_Att_Keys;
 our %macro_fsentity; # whether a macro is a filesystem name
 our %macro_dep; # whether a macro is a dependency
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 $VERSION = eval $VERSION;  ## no critic [BuiltinFunctions::ProhibitStringyEval]
 
 # Emulate something resembling CVS $Revision$
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm
index d469870..3b96836 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm
@@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Config;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use Config ();
 
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
index ac14d0d..d3aa100 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
@@ -1,6 +1,6 @@
 package ExtUtils::MakeMaker::FAQ;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 1;
 __END__
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod
index d5679a3..7e53baa 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod
@@ -1,6 +1,6 @@
 package ExtUtils::MakeMaker::Tutorial;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 
 =head1 NAME
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm
index 07743f0..35cd2ab 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm
@@ -15,7 +15,7 @@ use strict;
 
 use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
 
-$VERSION = '7.10';
+$VERSION = '7.10_01';
 $CLASS = 'version';
 
 {
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm
index be083b3..a0213b1 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm
@@ -10,7 +10,7 @@ use strict;
 
 use vars qw($VERSION $CLASS $STRICT $LAX);
 
-$VERSION = '7.10';
+$VERSION = '7.10_01';
 
 #--------------------------------------------------------------------------#
 # Version regexp components
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
index 74c9199..a393329 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
@@ -3,7 +3,7 @@ package ExtUtils::Mkbootstrap;
 # There's just too much Dynaloader incest here to turn on strict vars.
 use strict 'refs';
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require Exporter;
 our @ISA = ('Exporter');
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
index 09e058e..b80310e 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
@@ -10,7 +10,7 @@ use Config;
 
 our @ISA = qw(Exporter);
 our @EXPORT = qw(&Mksymlists);
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 sub Mksymlists {
     my(%spec) = @_;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
index 74bce3d..6f5d870 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
@@ -3,7 +3,7 @@ package ExtUtils::testlib;
 use strict;
 use warnings;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use Cwd;
 use File::Spec;
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index f64c73a..a29d836 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -2,8 +2,8 @@ CPAN cpan/CPAN/lib/CPAN.pm ce62c43d72f101c011184dbbc59e21c2790826f0
 Encode cpan/Encode/Encode.xs ef106510cceba35eaae4c52127116162f5d7260f
 Encode cpan/Encode/encoding.pm 51c19efc9bfe8467d6ae12a4654f6e7f980715bf
 Encode cpan/Encode/Unicode/Unicode.xs c7ab75e09f6b2685060d3c0bd091862fc2d31724
-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm fd048a43fc1a53acbe133bd96ddbf1421cfb28cf
-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm 0c78ba02d6249dfcca12ac9886a7c7cfb60e77fe
+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 830acdc810e2974d7fd4ec408ea1bfa825c75b69
+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm 1997912b5018970cdeb3dae8fd7e0c24f6e5d567
 ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/prereq.t 53bda2c549fd13a6b6c13a070ca6bc79883081c0
 ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/vstrings.t 90035a2bdbf45f15b9c3196d072d7cba7e662871
 Math::BigRat cpan/Math-BigRat/lib/Math/BigRat.pm 682352dde33638125ce12ca44990bd1cd44af4f8
-- 
1.9.5.msysgit.1

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2015

From @bulk88

0005-add-parallelness-to-win32-GNUmakefile.patch
From a4f0349078037cd0e13a9c7cd0742bc58941ede2 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Fri, 13 Nov 2015 00:44:04 -0500
Subject: [PATCH 5/5] add parallelness to win32/GNUmakefile

-.UPDATEALL is dmake only, doesn't exist in gmake, create more targets
 instead
GNUmakefile:1319: warning: overriding recipe for target '.UPDATEALL'
GNUmakefile:1024: warning: ignoring old recipe for target '.UPDATEALL'
-fix ok/nok targets on dmake and gmake
-modify whitespace and comments between 2 makesfiles so there are less
 delta lines if the 2 are diffed, this aids in diagnostics
-remove perlmainst.c/perlmain.c build products, just use runperl.c directly
 1 less disk file to create and later clean and git status and 2 less nodes
 in the make graph to traverse, also better for C debugger, since
 "runperl.c" is around after a git clean of the source tree, and runperl.c
 is in every single callstack in perl.
-remove copying mini config.h to CORE dir, pointless since (mini) config.h
 isn't an input to config_h.PL, remove the exit 1 from commit 137443ea0a
 from 5.003, rewriting config.h is not a reason to stop the build with a
 fatal error, vivify CORE dir or else sub copy() fails
-deshell UNIDATAFILES/mktables, 1 less cmd.exe process and 1 less .bat file
 written to disk for gmake (dmake always uses cmd.exe ATM)
-combining mini config.h AKA $(MINIDIR)\.exists shell append lines is for
 another commit
-perlglob.exe is not installed, it doesn't need to be rebased, it is only
 needed for module building, removing the dep makes the dep graph simpler
-rename PERLIMPLIB so the lib is built in its final location in CORE dir
 this removes an extra xcopy process run, note for GCC builds PERLIMPLIB
 is built twice in gmake and dmake, once from a def file, and again at
 perl5**.dll link time. Touching the buggy GCC linker is high risk so I
 am not removing the double creation of the lib.
-$(COREDIR)\ppport.h in gmake is separate lines since gmake normally
 launches processes directly, not through the shell, so it is more
 efficent to keep it as multiple lines for gmake, while dmake likes to
 burn CPU and IO between each line, and runs each line through cmd.exe
---
 README.win32      |   8 +-
 win32/GNUmakefile | 588 +++++++++++++++++++++++++++++-------------------------
 win32/config_h.PL |  14 +-
 win32/makefile.mk |  61 ++----
 4 files changed, 350 insertions(+), 321 deletions(-)

diff --git a/README.win32 b/README.win32
index 6726019..2479433 100644
--- a/README.win32
+++ b/README.win32
@@ -101,10 +101,10 @@ or Windows SDK. You may also use, for Visual C++ or Windows SDK, dmake instead
 of nmake.  dmake is open source software, but is not included with Visual C++ or
 Windows SDK.  Builds using gcc need dmake or gmake.  nmake is not supported for
 gcc builds.  gmake only supports gcc builds, not any other compiler.
-Parallel building is only supported with dmake with any compiler.  It is
-recommended to use dmake 4.13 or newer for parallel building.  Older dmakes,
-in parallel mode, have very high CPU usage and pound the disk/filing system
-with duplicate I/O calls in an aggressive polling loop.
+Parallel building is only supported with dmake and gmake, not nmake.  When using
+dmake it is recommended to use dmake 4.13 or newer for parallel building.
+Older dmakes, in parallel mode, have very high CPU usage and pound the
+disk/filing system with duplicate I/O calls in an aggressive polling loop.
 
 A port of dmake for Windows is available from:
 
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 120ead7..b836a31 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -138,7 +138,14 @@ USE_LARGE_FILES	:= define
 #USE_LONG_DOUBLE :=define
 
 #
-# uncomment next line if you want debug version of perl (big,slow)
+# Uncomment this if you want to disable looking up values from
+# HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
+# the Registry.
+#
+#USE_NO_REGISTRY := define
+
+#
+# uncomment next line if you want debug version of perl (big/slow)
 # If not enabled, we automatically try to use maximum optimization
 # with all compilers that are known to have a working optimizer.
 #
@@ -264,6 +271,7 @@ USE_PERLIO	?= undef
 USE_LARGE_FILES	?= undef
 USE_64_BIT_INT	?= undef
 USE_LONG_DOUBLE	?= undef
+USE_NO_REGISTRY	?= undef
 
 ifeq ($(USE_IMP_SYS),define)
 PERL_MALLOC	= undef
@@ -297,6 +305,10 @@ ifneq ($(USE_IMP_SYS),undef)
 BUILDOPT	+= -DPERL_IMPLICIT_SYS
 endif
 
+ifeq ($(USE_NO_REGISTRY),define)
+BUILDOPT	+= -DWIN32_NO_REGISTRY
+endif
+
 ifeq ($(WIN64),define)
 USE_64_BIT_INT	= define
 endif
@@ -382,7 +394,7 @@ a = .a
 # Options
 #
 
-INCLUDES	= -I.\include -I. -I.. -I$(COREDIR)
+INCLUDES	= -I.\include -I. -I..
 DEFINES		= -DWIN32
 ifeq ($(WIN64),define)
 DEFINES		+= -DWIN64 -DCONSERVATIVE
@@ -391,11 +403,9 @@ LOCDEFS		= -DPERLDLL -DPERL_CORE
 SUBSYS		= console
 CXX_FLAG	= -xc++
 LIBC		=
-LIBFILES	= $(LIBC) \
-		  -lmoldname -lkernel32 -luser32 -lgdi32 \
-		  -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
-		  -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
-		  -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
+LIBFILES	= $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \
+	-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \
+	-luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
 
 ifeq ($(CFG),Debug)
 OPTIMIZE	= -g -O2 -DDEBUGGING
@@ -411,6 +421,7 @@ LINK_FLAGS	= $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
 OBJOUT_FLAG	= -o
 EXEOUT_FLAG	= -o
 LIBOUT_FLAG	=
+PDBOUT		=
 
 BUILDOPT	+= -fno-strict-aliasing -mms-bitfields
 MINIBUILDOPT	+= -fno-strict-aliasing
@@ -443,14 +454,19 @@ BLINK_FLAGS	= $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
 
 #
 # various targets
+
+#do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL)
+#$(MINIPERL) is not a buildable target, use "gmake mp" if you want to just build
+#miniperl alone
 MINIPERL	= ..\miniperl.exe
+HAVEMINIPERL	= ..\lib\buildcustomize.pl
 MINIDIR		= mini
 PERLEXE		= ..\perl.exe
 WPERLEXE	= ..\wperl.exe
 PERLEXESTATIC	= ..\perl-static.exe
 STATICDIR	= .\static.tmp
 GLOBEXE		= ..\perlglob.exe
-CONFIGPM	= ..\lib\Config.pm ..\lib\Config_heavy.pl
+CONFIGPM	= ..\lib\Config.pm
 GENUUDMAP	= ..\generate_uudmap.exe
 ifeq ($(BUILD_STATIC),define)
 PERLSTATIC	= static
@@ -481,7 +497,7 @@ PERLDLL_RES	=
 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
 # on and really only the interface - i.e. the .def file used to export symbols
 # from the .dll
-PERLDEP = perldll.def
+PERLDEP = $(PERLIMPLIB)
 
 
 PL2BAT		= bin\pl2bat.pl
@@ -498,6 +514,7 @@ UTILS		=			\
 		..\utils\perlivp	\
 		..\utils\libnetcfg	\
 		..\utils\enc2xs		\
+		..\utils\encguess	\
 		..\utils\piconv		\
 		..\utils\corelist	\
 		..\utils\cpan		\
@@ -519,7 +536,8 @@ UTILS		=			\
 
 CFGSH_TMPL	= config.gc
 CFGH_TMPL	= config_H.gc
-PERLIMPLIB	= ..\libperl523$(a)
+PERLIMPLIB	= $(COREDIR)\libperl523$(a)
+PERLIMPLIBBASE	= libperl523$(a)
 PERLSTATICLIB	= ..\libperl523s$(a)
 INT64		= long long
 
@@ -527,49 +545,62 @@ INT64		= long long
 # only change when there is an incompatible revision of the public API.
 PERLDLL		= ..\perl523.dll
 
+#EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel
+#$(MAKE) will contain the -P that this makefile was called with, which is bad for
+#make_ext.pl since upto jobs*jobs processes will run instead of jobs
+#also any recipie containing $(MAKE) is special cased by dmake to execute recipes
+#containing $(MAKE) when "dmake -n" is executed, which causes recursive calls
+#to dmake, which means "dmake -n" is then broken as a diagnostic tool since
+#"dmake -n" will invoke all the make_ext.pl scripts build things instead of
+#showing what to build since $(MAKE) is an arg to make_ext.pl, not an invocation
+#of the dmake process
+PLMAKE		= gmake
+
 XCOPY		= xcopy /f /r /i /d /y
 RCOPY		= xcopy /f /r /i /e /d /y
 NOOP		= @rem
 
+#first ones are arrange in compile time order for faster parallel building
+#see #123867 for details
 MICROCORE_SRC	=		\
+		..\toke.c	\
+		..\regcomp.c	\
+		..\regexec.c	\
+		..\op.c		\
+		..\sv.c		\
+		..\pp.c		\
+		..\pp_ctl.c	\
+		..\pp_sys.c	\
+		..\pp_pack.c	\
+		..\pp_hot.c	\
+		..\gv.c		\
+		..\perl.c	\
+		..\utf8.c	\
+		..\dump.c	\
+		..\hv.c		\
 		..\av.c		\
 		..\caretx.c	\
 		..\deb.c	\
 		..\doio.c	\
 		..\doop.c	\
 		..\dquote.c	\
-		..\dump.c	\
 		..\globals.c	\
-		..\gv.c		\
 		..\mro_core.c	\
-		..\hv.c		\
 		..\locale.c	\
 		..\keywords.c	\
 		..\mathoms.c    \
 		..\mg.c		\
 		..\numeric.c	\
-		..\op.c		\
 		..\pad.c	\
-		..\perl.c	\
 		..\perlapi.c	\
 		..\perly.c	\
-		..\pp.c		\
-		..\pp_ctl.c	\
-		..\pp_hot.c	\
-		..\pp_pack.c	\
 		..\pp_sort.c	\
-		..\pp_sys.c	\
 		..\reentr.c	\
-		..\regcomp.c	\
-		..\regexec.c	\
 		..\run.c	\
 		..\scope.c	\
-		..\sv.c		\
 		..\taint.c	\
 		..\time64.c	\
-		..\toke.c	\
 		..\universal.c	\
-		..\utf8.c	\
 		..\util.c
 
 EXTRACORE_SRC	+= perllib.c
@@ -639,6 +670,9 @@ UUDMAP_H	= ..\uudmap.h
 BITCOUNT_H	= ..\bitcount.h
 MG_DATA_H	= ..\mg_data.h
 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
+#a stub ppport.h must be generated so building XS modules, .c->.obj wise, will
+#work, so this target also represents creating the COREDIR and filling it
+HAVE_COREDIR	= $(COREDIR)\ppport.h
 
 MICROCORE_OBJ	= $(MICROCORE_SRC:.c=.o)
 CORE_OBJ	= $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.o)
@@ -650,7 +684,6 @@ MINICORE_OBJ	= $(subst ..\,mini\,$(MICROCORE_OBJ))	\
 MINIWIN32_OBJ	= $(subst .\,mini\,$(WIN32_OBJ))
 MINI_OBJ	= $(MINICORE_OBJ) $(MINIWIN32_OBJ)
 DLL_OBJ		= $(DYNALOADER)
-GENUUDMAP_OBJ	= $(GENUUDMAP:.exe=.o)
 
 PERLDLL_OBJ	= $(CORE_OBJ)
 PERLEXE_OBJ	= perlmain$(o)
@@ -687,14 +720,15 @@ CFG_VARS	=					\
 		"cc=$(CC)"				\
 		"ld=$(LINK32)"				\
 		"ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT)" \
+		"usecplusplus=$(USE_CPLUSPLUS)"		\
 		"cf_email=$(EMAIL)"			\
 		"d_mymalloc=$(PERL_MALLOC)"		\
 		"libs=$(LIBFILES)"			\
 		"incpath=$(CCINCDIR)"			\
-		"libperl=$(subst ..\,,$(PERLIMPLIB))"	\
+		"libperl=$(PERLIMPLIBBASE)"		\
 		"libpth=$(CCLIBDIR);$(EXTRALIBDIRS)"	\
 		"libc=$(LIBC)"				\
-		"make=$(MAKE)"				\
+		"make=$(PLMAKE)"				\
 		"_o=$(o)"				\
 		"obj_ext=$(o)"				\
 		"_a=$(a)"				\
@@ -719,9 +753,7 @@ CFG_VARS	=					\
 
 .PHONY: all info
 
-all : info .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL)	\
-	$(CONFIGPM) $(UNIDATAFILES) MakePPPort			\
-	$(PERLEXE) Extensions Extensions_nonxs $(PERLSTATIC)
+all : info rebasePE Extensions_nonxs $(PERLSTATIC)
 
 info :
 	@echo # GCCBIN=$(GCCBIN)
@@ -731,20 +763,18 @@ info :
 	@echo # WIN64=$(WIN64)
 	@echo # ARCHITECTURE=$(ARCHITECTURE)
 	@echo # ARCHNAME=$(ARCHNAME)
-	@echo # MAKE=$(MAKE)
+	@echo # MAKE=$(PLMAKE)
 ifeq ($(GCCTARGET),)
 	@echo Unable to detect gcc and/or architecture!
 	@exit 1
 endif
 
 
-regnodes : ..\regnodes.h
-
 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
 
 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
 
-reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL)	\
+reonly : ..\regnodes.h .\config.h ..\git_version.h $(GLOBEXE) $(HAVEMINIPERL)\
 	$(CONFIGPM) $(UNIDATAFILES) $(PERLEXE)				\
 	Extensions_reonly
 
@@ -752,11 +782,45 @@ static: $(PERLEXESTATIC)
 
 #----------------------------------------------------------------
 
-$(GLOBEXE) : perlglob$(o)
-	$(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
+$(GLOBEXE) : perlglob.c
+	$(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
+
+..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
+	$(MINIPERL) -I..\lib ..\make_patchnum.pl
+
+# make sure that we recompile perl.c if the git version changes
+..\perl$(o) : ..\git_version.h
 
-perlglob$(o)  : perlglob.c
+..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL)
+	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
 
+# This target is for when changes to the main config.sh happen.
+# Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
+# with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
+# this target to regenerate config_H.gc.
+regen_config_h:
+	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
+	$(MINIPERL) -I..\lib ..\configpm --chdir=..
+	-del /f $(CFGH_TMPL)
+	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
+	rename config.h $(CFGH_TMPL)
+
+$(CONFIGPM): ..\config.sh config_h.PL
+	$(MINIPERL) -I..\lib ..\configpm --chdir=..
+	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
+
+.\config.h : $(CONFIGPM)
+
+# See the comment in Makefile.SH explaining this seemingly cranky ordering
+..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
+	$(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
+	$(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
+
+#convinence target, get a working miniperl
+mp : $(CONFIGPM)
+
+$(MINIDIR)\.exists : $(CFGH_TMPL)
+	if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
 #
 # Copy the template config.h and set configurables at the end of it
 # as per the options chosen and compiler used.
@@ -766,209 +830,173 @@ perlglob$(o)  : perlglob.c
 # real config.h used to build perl.exe is generated from the top-level
 # config_h.SH by config_h.PL (run by miniperl.exe).
 #
-.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
+# MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd
+# config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ).
 	-del /f config.h
 	copy $(CFGH_TMPL) config.h
-	@echo.>>$@
-	@echo #ifndef _config_h_footer_>>$@
-	@echo #define _config_h_footer_>>$@
-	@echo #undef Off_t>>$@
-	@echo #undef LSEEKSIZE>>$@
-	@echo #undef Off_t_size>>$@
-	@echo #undef PTRSIZE>>$@
-	@echo #undef SSize_t>>$@
-	@echo #undef HAS_ATOLL>>$@
-	@echo #undef HAS_STRTOLL>>$@
-	@echo #undef HAS_STRTOULL>>$@
-	@echo #undef Size_t_size>>$@
-	@echo #undef IVTYPE>>$@
-	@echo #undef UVTYPE>>$@
-	@echo #undef IVSIZE>>$@
-	@echo #undef UVSIZE>>$@
-	@echo #undef NV_PRESERVES_UV>>$@
-	@echo #undef NV_PRESERVES_UV_BITS>>$@
-	@echo #undef IVdf>>$@
-	@echo #undef UVuf>>$@
-	@echo #undef UVof>>$@
-	@echo #undef UVxf>>$@
-	@echo #undef UVXf>>$@
-	@echo #undef USE_64_BIT_INT>>$@
-	@echo #undef Gconvert>>$@
-	@echo #undef HAS_FREXPL>>$@
-	@echo #undef HAS_ISNANL>>$@
-	@echo #undef HAS_MODFL>>$@
-	@echo #undef HAS_MODFL_PROTO>>$@
-	@echo #undef HAS_SQRTL>>$@
-	@echo #undef HAS_STRTOLD>>$@
-	@echo #undef PERL_PRIfldbl>>$@
-	@echo #undef PERL_PRIgldbl>>$@
-	@echo #undef PERL_PRIeldbl>>$@
-	@echo #undef PERL_SCNfldbl>>$@
-	@echo #undef NVTYPE>>$@
-	@echo #undef NVSIZE>>$@
-	@echo #undef LONG_DOUBLESIZE>>$@
-	@echo #undef NV_OVERFLOWS_INTEGERS_AT>>$@
-	@echo #undef NVef>>$@
-	@echo #undef NVff>>$@
-	@echo #undef NVgf>>$@
-	@echo #undef USE_LONG_DOUBLE>>$@
+	@echo.>> config.h
+	@echo #ifndef _config_h_footer_>> config.h
+	@echo #define _config_h_footer_>> config.h
+	@echo #undef Off_t>> config.h
+	@echo #undef LSEEKSIZE>> config.h
+	@echo #undef Off_t_size>> config.h
+	@echo #undef PTRSIZE>> config.h
+	@echo #undef SSize_t>> config.h
+	@echo #undef HAS_ATOLL>> config.h
+	@echo #undef HAS_STRTOLL>> config.h
+	@echo #undef HAS_STRTOULL>> config.h
+	@echo #undef Size_t_size>> config.h
+	@echo #undef IVTYPE>> config.h
+	@echo #undef UVTYPE>> config.h
+	@echo #undef IVSIZE>> config.h
+	@echo #undef UVSIZE>> config.h
+	@echo #undef NV_PRESERVES_UV>> config.h
+	@echo #undef NV_PRESERVES_UV_BITS>> config.h
+	@echo #undef IVdf>> config.h
+	@echo #undef UVuf>> config.h
+	@echo #undef UVof>> config.h
+	@echo #undef UVxf>> config.h
+	@echo #undef UVXf>> config.h
+	@echo #undef USE_64_BIT_INT>> config.h
+	@echo #undef Gconvert>> config.h
+	@echo #undef HAS_FREXPL>> config.h
+	@echo #undef HAS_ISNANL>> config.h
+	@echo #undef HAS_MODFL>> config.h
+	@echo #undef HAS_MODFL_PROTO>> config.h
+	@echo #undef HAS_SQRTL>> config.h
+	@echo #undef HAS_STRTOLD>> config.h
+	@echo #undef PERL_PRIfldbl>> config.h
+	@echo #undef PERL_PRIgldbl>> config.h
+	@echo #undef PERL_PRIeldbl>> config.h
+	@echo #undef PERL_SCNfldbl>> config.h
+	@echo #undef NVTYPE>> config.h
+	@echo #undef NVSIZE>> config.h
+	@echo #undef LONG_DOUBLESIZE>> config.h
+	@echo #undef NV_OVERFLOWS_INTEGERS_AT>> config.h
+	@echo #undef NVef>> config.h
+	@echo #undef NVff>> config.h
+	@echo #undef NVgf>> config.h
+	@echo #undef USE_LONG_DOUBLE>> config.h
 ifeq ($(USE_LARGE_FILES),define)
-	@echo #define Off_t $(INT64)>>$@
-	@echo #define LSEEKSIZE ^8>>$@
-	@echo #define Off_t_size ^8>>$@
+	@echo #define Off_t $(INT64)>> config.h
+	@echo #define LSEEKSIZE ^8>> config.h
+	@echo #define Off_t_size ^8>> config.h
 else
-	@echo #define Off_t long>>$@
-	@echo #define LSEEKSIZE ^4>>$@
-	@echo #define Off_t_size ^4>>$@
+	@echo #define Off_t long>> config.h
+	@echo #define LSEEKSIZE ^4>> config.h
+	@echo #define Off_t_size ^4>> config.h
 endif
 ifeq ($(WIN64),define)
-	@echo #define PTRSIZE ^8>>$@
-	@echo #define SSize_t $(INT64)>>$@
-	@echo #define HAS_ATOLL>>$@
-	@echo #define HAS_STRTOLL>>$@
-	@echo #define HAS_STRTOULL>>$@
-	@echo #define Size_t_size ^8>>$@
+	@echo #define PTRSIZE ^8>> config.h
+	@echo #define SSize_t $(INT64)>> config.h
+	@echo #define HAS_ATOLL>> config.h
+	@echo #define HAS_STRTOLL>> config.h
+	@echo #define HAS_STRTOULL>> config.h
+	@echo #define Size_t_size ^8>> config.h
 else
-	@echo #define PTRSIZE ^4>>$@
-	@echo #define SSize_t int>>$@
-	@echo #undef HAS_ATOLL>>$@
-	@echo #undef HAS_STRTOLL>>$@
-	@echo #undef HAS_STRTOULL>>$@
-	@echo #define Size_t_size ^4>>$@
+	@echo #define PTRSIZE ^4>> config.h
+	@echo #define SSize_t int>> config.h
+	@echo #undef HAS_ATOLL>> config.h
+	@echo #undef HAS_STRTOLL>> config.h
+	@echo #undef HAS_STRTOULL>> config.h
+	@echo #define Size_t_size ^4>> config.h
 endif
 ifeq ($(USE_64_BIT_INT),define)
-	@echo #define IVTYPE $(INT64)>>$@
-	@echo #define UVTYPE unsigned $(INT64)>>$@
-	@echo #define IVSIZE ^8>>$@
-	@echo #define UVSIZE ^8>>$@
+	@echo #define IVTYPE $(INT64)>> config.h
+	@echo #define UVTYPE unsigned $(INT64)>> config.h
+	@echo #define IVSIZE ^8>> config.h
+	@echo #define UVSIZE ^8>> config.h
 ifeq ($(USE_LONG_DOUBLE),define)
-	@echo #define NV_PRESERVES_UV>>$@
-	@echo #define NV_PRESERVES_UV_BITS 64>>$@
+	@echo #define NV_PRESERVES_UV>> config.h
+	@echo #define NV_PRESERVES_UV_BITS 64>> config.h
 else
-	@echo #undef NV_PRESERVES_UV>>$@
-	@echo #define NV_PRESERVES_UV_BITS 53>>$@
+	@echo #undef NV_PRESERVES_UV>> config.h
+	@echo #define NV_PRESERVES_UV_BITS 53>> config.h
 endif
-	@echo #define IVdf "I64d">>$@
-	@echo #define UVuf "I64u">>$@
-	@echo #define UVof "I64o">>$@
-	@echo #define UVxf "I64x">>$@
-	@echo #define UVXf "I64X">>$@
-	@echo #define USE_64_BIT_INT>>$@
+	@echo #define IVdf "I64d">> config.h
+	@echo #define UVuf "I64u">> config.h
+	@echo #define UVof "I64o">> config.h
+	@echo #define UVxf "I64x">> config.h
+	@echo #define UVXf "I64X">> config.h
+	@echo #define USE_64_BIT_INT>> config.h
 else
-	@echo #define IVTYPE long>>$@
-	@echo #define UVTYPE unsigned long>>$@
-	@echo #define IVSIZE ^4>>$@
-	@echo #define UVSIZE ^4>>$@
-	@echo #define NV_PRESERVES_UV>>$@
-	@echo #define NV_PRESERVES_UV_BITS 32>>$@
-	@echo #define IVdf "ld">>$@
-	@echo #define UVuf "lu">>$@
-	@echo #define UVof "lo">>$@
-	@echo #define UVxf "lx">>$@
-	@echo #define UVXf "lX">>$@
-	@echo #undef USE_64_BIT_INT>>$@
+	@echo #define IVTYPE long>> config.h
+	@echo #define UVTYPE unsigned long>> config.h
+	@echo #define IVSIZE ^4>> config.h
+	@echo #define UVSIZE ^4>> config.h
+	@echo #define NV_PRESERVES_UV>> config.h
+	@echo #define NV_PRESERVES_UV_BITS 32>> config.h
+	@echo #define IVdf "ld">> config.h
+	@echo #define UVuf "lu">> config.h
+	@echo #define UVof "lo">> config.h
+	@echo #define UVxf "lx">> config.h
+	@echo #define UVXf "lX">> config.h
+	@echo #undef USE_64_BIT_INT>> config.h
 endif
 ifeq ($(USE_LONG_DOUBLE),define)
-	@echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*""Lg",(n),(x))>>$@
-	@echo #define HAS_FREXPL>>$@
-	@echo #define HAS_ISNANL>>$@
-	@echo #define HAS_MODFL>>$@
-	@echo #define HAS_MODFL_PROTO>>$@
-	@echo #define HAS_SQRTL>>$@
-	@echo #define HAS_STRTOLD>>$@
-	@echo #define PERL_PRIfldbl "Lf">>$@
-	@echo #define PERL_PRIgldbl "Lg">>$@
-	@echo #define PERL_PRIeldbl "Le">>$@
-	@echo #define PERL_SCNfldbl "Lf">>$@
-	@echo #define NVTYPE long double>>$@
+	@echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*""Lg",(n),(x))>> config.h
+	@echo #define HAS_FREXPL>> config.h
+	@echo #define HAS_ISNANL>> config.h
+	@echo #define HAS_MODFL>> config.h
+	@echo #define HAS_MODFL_PROTO>> config.h
+	@echo #define HAS_SQRTL>> config.h
+	@echo #define HAS_STRTOLD>> config.h
+	@echo #define PERL_PRIfldbl "Lf">> config.h
+	@echo #define PERL_PRIgldbl "Lg">> config.h
+	@echo #define PERL_PRIeldbl "Le">> config.h
+	@echo #define PERL_SCNfldbl "Lf">> config.h
+	@echo #define NVTYPE long double>> config.h
 ifeq ($(WIN64),define)
-	@echo #define NVSIZE ^16>>$@
-	@echo #define LONG_DOUBLESIZE ^16>>$@
+	@echo #define NVSIZE ^16>> config.h
+	@echo #define LONG_DOUBLESIZE ^16>> config.h
 else
-	@echo #define NVSIZE ^12>>$@
-	@echo #define LONG_DOUBLESIZE ^12>>$@
+	@echo #define NVSIZE ^12>> config.h
+	@echo #define LONG_DOUBLESIZE ^12>> config.h
 endif
-	@echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0>>$@
-	@echo #define NVef "Le">>$@
-	@echo #define NVff "Lf">>$@
-	@echo #define NVgf "Lg">>$@
-	@echo #define USE_LONG_DOUBLE>>$@
+	@echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0>> config.h
+	@echo #define NVef "Le">> config.h
+	@echo #define NVff "Lf">> config.h
+	@echo #define NVgf "Lg">> config.h
+	@echo #define USE_LONG_DOUBLE>> config.h
 else
-	@echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*g",(n),(x))>>$@
-	@echo #undef HAS_FREXPL>>$@
-	@echo #undef HAS_ISNANL>>$@
-	@echo #undef HAS_MODFL>>$@
-	@echo #undef HAS_MODFL_PROTO>>$@
-	@echo #undef HAS_SQRTL>>$@
-	@echo #undef HAS_STRTOLD>>$@
-	@echo #undef PERL_PRIfldbl>>$@
-	@echo #undef PERL_PRIgldbl>>$@
-	@echo #undef PERL_PRIeldbl>>$@
-	@echo #undef PERL_SCNfldbl>>$@
-	@echo #define NVTYPE double>>$@
-	@echo #define NVSIZE ^8>>$@
-	@echo #define LONG_DOUBLESIZE ^8>>$@
-	@echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0>>$@
-	@echo #define NVef "e">>$@
-	@echo #define NVff "f">>$@
-	@echo #define NVgf "g">>$@
-	@echo #undef USE_LONG_DOUBLE>>$@
+	@echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*g",(n),(x))>> config.h
+	@echo #undef HAS_FREXPL>> config.h
+	@echo #undef HAS_ISNANL>> config.h
+	@echo #undef HAS_MODFL>> config.h
+	@echo #undef HAS_MODFL_PROTO>> config.h
+	@echo #undef HAS_SQRTL>> config.h
+	@echo #undef HAS_STRTOLD>> config.h
+	@echo #undef PERL_PRIfldbl>> config.h
+	@echo #undef PERL_PRIgldbl>> config.h
+	@echo #undef PERL_PRIeldbl>> config.h
+	@echo #undef PERL_SCNfldbl>> config.h
+	@echo #define NVTYPE double>> config.h
+	@echo #define NVSIZE ^8>> config.h
+	@echo #define LONG_DOUBLESIZE ^8>> config.h
+	@echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0>> config.h
+	@echo #define NVef "e">> config.h
+	@echo #define NVff "f">> config.h
+	@echo #define NVgf "g">> config.h
+	@echo #undef USE_LONG_DOUBLE>> config.h
 endif
-	@echo #endif>>$@
-
-..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
-	cd .. && miniperl -Ilib make_patchnum.pl
-
-# make sure that we recompile perl.c if the git version changes
-..\perl$(o) : ..\git_version.h
-
-..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(MINIPERL)
-	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
-
-# This target is for when changes to the main config.sh happen.
-# Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
-# with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
-# this target to regenerate config_H.gc.
-regen_config_h:
-	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS)) $(CFGSH_TMPL) > ..\config.sh
-	$(MINIPERL) -I..\lib ..\configpm --chdir=..
-	-del /f $(CFGH_TMPL)
-	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
-	rename config.h $(CFGH_TMPL)
-
-$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
-	$(MINIPERL) -I..\lib ..\configpm --chdir=..
-	if exist lib\* $(RCOPY) "lib\*.*" ..\lib\$(NULL)
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(XCOPY) "*.h" $(COREDIR)\$(NULL)
-	$(RCOPY) include $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \
-	    || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
-
-# See the comment in Makefile.SH explaining this seemingly cranky ordering
-$(MINIPERL) : ..\lib\buildcustomize.pl
-
-..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl
-	$(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
-	$(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
-
-$(MINIDIR) :
-	if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
+	@echo #endif>> config.h
+#separate line since this is sentinal that this target is done
+	rem. > $(MINIDIR)\.exists
 
 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
-	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
+	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*F).c
 
 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
-	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c
+	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*F).c
 
 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
-# unless the .IF is true), so instead we use a else with the default.
+# unless the .IF is true), so instead we use a .ELSE with the default.
 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
 
-perllib$(o)	: perllib.c .\perlhost.h .\vdir.h .\vmem.h
+perllib$(o)	: perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h
 ifeq ($(USE_IMP_SYS),define)
-	$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
+	$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
 else
 	$(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
 endif
@@ -976,7 +1004,7 @@ endif
 # 1. we don't want to rebuild miniperl.exe when config.h changes
 # 2. we don't want to rebuild miniperl.exe with non-default config.h
 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
-$(MINI_OBJ)	: $(CORE_NOCFG_H)
+$(MINI_OBJ)	: $(MINIDIR)\.exists $(CORE_NOCFG_H)
 
 $(WIN32_OBJ)	: $(CORE_H)
 
@@ -984,12 +1012,20 @@ $(CORE_OBJ)	: $(CORE_H)
 
 $(DLL_OBJ)	: $(CORE_H)
 
-perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
+
+perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl
 	$(MINIPERL) -I..\lib create_perllibst_h.pl
+
+perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
 	$(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
 	$(BUILDOPT) CCTYPE=GCC TARG_DIR=..\ > perldll.def
 
-$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
+$(PERLEXPLIB) : $(PERLIMPLIB)
+
+$(PERLIMPLIB) : perldll.def
+	$(IMPLIB) -k -d perldll.def -l $(PERLIMPLIB)
+
+$(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
 	$(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
 	   $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES)
 	$(IMPLIB) --output-lib $(PERLIMPLIB) \
@@ -999,7 +1035,6 @@ $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
 		--output-exp perl.exp
 	$(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
 	    $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) perl.exp
-	$(XCOPY) $(PERLIMPLIB) $(COREDIR)
 
 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
 	$(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
@@ -1020,24 +1055,26 @@ $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
 $(BITCOUNT_H) : $(GENUUDMAP)
 	$(GENUUDMAP) $(GENERATED_HEADERS)
 
-$(GENUUDMAP_OBJ) : ..\mg_raw.h
-
-$(GENUUDMAP) : $(GENUUDMAP_OBJ)
-	$(LINK32) -o $@ $(BLINK_FLAGS) $(GENUUDMAP_OBJ) $(LIBFILES)
+$(GENUUDMAP) : ..\mg_raw.h
+	$(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
+	$(BLINK_FLAGS) $(LIBFILES)
 
-perlmain.c : runperl.c
-	copy runperl.c perlmain.c
+#This generates a stub ppport.h & creates & fills /lib/CORE to allow for XS
+#building .c->.obj wise (linking is a different thing). This taget is AKA
+#$(HAVE_COREDIR).
+$(COREDIR)\ppport.h : $(CORE_H)
+	$(XCOPY) *.h $(COREDIR)\\*.*
+	$(RCOPY) include $(COREDIR)\\*.*
+	$(XCOPY) ..\\*.h $(COREDIR)\\*.*
+	rem. > $@
 
-perlmain$(o) : perlmain.c
-	$(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ -c perlmain.c
+perlmain$(o) : runperl.c $(CONFIGPM)
+	$(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 
-perlmainst.c : runperl.c
-	copy runperl.c perlmainst.c
+perlmainst$(o) : runperl.c $(CONFIGPM)
+	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 
-perlmainst$(o) : perlmainst.c
-	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
-
-$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
+$(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
 	$(LINK32) -mconsole -o $@ $(BLINK_FLAGS)  \
 	    $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
 	copy $(PERLEXE) $(WPERLEXE)
@@ -1047,42 +1084,50 @@ $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
 	$(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
 	    $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
 
-MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
-	$(MINIPERL) -I..\lib ..\mkppport
-
 #-------------------------------------------------------------------------------
 # There's no direct way to mark a dependency on
 # DynaLoader.pm, so this will have to do
-Extensions : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
 
-Extensions_reonly : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
+#most of deps of this target are in DYNALOADER and therefore omitted here
+Extensions : $(PERLDEP) $(DYNALOADER) $(GLOBEXE)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
 
-Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
+Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize
+
+Extensions_reonly : $(PERLDEP) $(DYNALOADER)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
+
+Extensions_static : ..\make_ext.pl list_static_libs.pl $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
 	$(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 
-Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
+Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs
 
-$(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
+#lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building
+$(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader lib
 
 Extensions_clean :
-	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
+	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
 
 Extensions_realclean :
-	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
+	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
+
+# all PE files need to be built by the time this target runs, PP files can still
+# be running in parallel like UNIDATAFILES, this target a placeholder for the
+# future
+ifeq ($(BUILD_STATIC),define)
+rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(PERLEXESTATIC)
+else
+rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE)
+endif
+	$(NOOP)
 
 #-------------------------------------------------------------------------------
 
-doc: $(PERLEXE) ..\pod\perltoc.pod
+doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod
 	$(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
 	    --podpath=pod:lib:utils --htmlroot="file://$(subst :,|,$(INST_HTML))"\
 	    --recurse
@@ -1092,8 +1137,8 @@ doc: $(PERLEXE) ..\pod\perltoc.pod
 
 # Note that this next section is parsed (and regenerated) by pod/buildtoc
 # so please check that script before making structural changes here
-utils: $(PERLEXE) ..\utils\Makefile
-	cd ..\utils && $(MAKE) PERL=$(MINIPERL)
+utils: $(HAVEMINIPERL) ..\utils\Makefile
+	cd ..\utils && $(PLMAKE) PERL=$(MINIPERL)
 	copy ..\README.aix      ..\pod\perlaix.pod
 	copy ..\README.amiga    ..\pod\perlamiga.pod
 	copy ..\README.android  ..\pod\perlandroid.pod
@@ -1128,11 +1173,11 @@ utils: $(PERLEXE) ..\utils\Makefile
 	copy ..\README.vos      ..\pod\perlvos.pod
 	copy ..\README.win32    ..\pod\perlwin32.pod
 	copy ..\pod\perldelta.pod ..\pod\perl5235delta.pod
-	$(PERLEXE) $(PL2BAT) $(UTILS)
+	$(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
 	$(MINIPERL) -I..\lib ..\autodoc.pl ..
 	$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
 
-..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
+..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs Extensions_normalize utils
 	$(PERLEXE) -f ..\pod\buildtoc -q
 
 # Note that the pod cleanup in this next section is parsed (and regenerated
@@ -1233,7 +1278,7 @@ distclean: realclean
 	    perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
 	    perlwin32.pod
 	-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
-	    perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
+	    perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \
 	    xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
 	-del /f ..\config.sh perlmain.c dlutils.c config.h.new \
 	    perlmainst.c
@@ -1269,11 +1314,12 @@ installhtml : doc
 inst_lib : $(CONFIGPM)
 	$(RCOPY) ..\lib $(INST_LIB)\$(NULL)
 
-$(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
-	cd ..\lib\unicore && \
-	..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p
+$(UNIDATAFILES) : ..\pod\perluniprops.pod
+
+..\pod\perluniprops.pod: ..\lib\unicore\mktables $(CONFIGPM)
+	$(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
 
-minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
+minitest : $(HAVEMINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
 	$(XCOPY) $(MINIPERL) ..\t\$(NULL)
 	if exist ..\t\perl.exe del /f ..\t\perl.exe
 	rename ..\t\miniperl.exe perl.exe
@@ -1311,11 +1357,10 @@ test-reonly : reonly utils
 	$(XCOPY) $(PERLDLL) ..\t\$(NULL)
 	$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
 	cd ..\t && \
-	$(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
-	cd ..\win32
+	$(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA)
 
 regen :
-	cd .. && regen.pl && cd win32
+	cd .. && regen.pl
 
 test-notty : test-prep
 	set PERL_STATIC_EXT=$(STATIC_EXT) && \
@@ -1354,7 +1399,7 @@ _clean :
 	-@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
 	-@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
 	-@erase *.ilk
-	-@erase *.pdb
+	-@erase *.pdb ..\*.pdb
 	-@erase Extensions_static
 
 clean : Extensions_clean _clean
@@ -1365,14 +1410,15 @@ realclean : Extensions_realclean _clean
 # installed perlbug. We don't re-run the tests here - we trust the user.
 # Please *don't* use this unless all tests pass.
 # If you want to report test failures, use "gmake nok" instead.
-ok: utils
-	$(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
+ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
+	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
+
+okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
+	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
 
-okfile: utils
-	$(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
+nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
+	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
 
-nok: utils
-	$(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
+nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
+	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok
 
-nokfile: utils
-	$(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok
diff --git a/win32/config_h.PL b/win32/config_h.PL
index 1280655..89c7a20 100644
--- a/win32/config_h.PL
+++ b/win32/config_h.PL
@@ -84,10 +84,12 @@ while (<SH>)
 close(H);
 close(SH);
 
-if (compare("$file.new","$opt{CORE_DIR}/$opt{CONFIG_H}")) {
-    chmod(0666,"$opt{CORE_DIR}/$opt{CONFIG_H}");
-    copy("$file.new","$opt{CORE_DIR}/$opt{CONFIG_H}") || die "Cannot copy:$!";
-    chmod(0444,"$opt{CORE_DIR}/$opt{CONFIG_H}");
+my $core_config_h = "$opt{CORE_DIR}/$opt{CONFIG_H}";
+if (compare("$file.new", $core_config_h)) {
+    mkdir $opt{CORE_DIR} unless -d $opt{CORE_DIR};
+    chmod(0666,$core_config_h);
+    copy("$file.new",$core_config_h) || die "Cannot copy:$!";
+    chmod(0444,$core_config_h);
 }
 
 if (compare("$file.new",$file))
@@ -95,13 +97,11 @@ if (compare("$file.new",$file))
   warn "$file has changed\n";
   chmod(0666,$file);
   unlink($file);
-  rename("$file.new",$file);
-  exit(1);
+  rename("$file.new",$file) || die "Cannot rename:$!";
  }
 else
  {
   unlink ("$file.new");
-  exit(0);
  }
 
 sub Config
diff --git a/win32/makefile.mk b/win32/makefile.mk
index dece68a..604a4ce 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -823,7 +823,7 @@ UTILS		=			\
 		..\utils\perlivp	\
 		..\utils\libnetcfg	\
 		..\utils\enc2xs		\
-		..\utils\encguess		\
+		..\utils\encguess	\
 		..\utils\piconv		\
 		..\utils\corelist	\
 		..\utils\cpan		\
@@ -847,7 +847,7 @@ UTILS		=			\
 
 CFGSH_TMPL	= config.gc
 CFGH_TMPL	= config_H.gc
-PERLIMPLIB	= ..\libperl523$(a)
+PERLIMPLIB	= $(COREDIR)\libperl523$(a)
 PERLSTATICLIB	= ..\libperl523s$(a)
 INT64		= long long
 
@@ -861,8 +861,8 @@ INT64		= __int64
 
 # makedef.pl must be updated if this changes, and this should normally
 # only change when there is an incompatible revision of the public API.
-PERLIMPLIB	*= ..\perl523$(a)
-PERLEXPLIB	*= ..\perl523.exp
+PERLIMPLIB	*= $(COREDIR)\perl523$(a)
+PERLEXPLIB	*= $(COREDIR)\perl523.exp
 PERLSTATICLIB	*= ..\perl523s$(a)
 PERLDLL		= ..\perl523.dll
 
@@ -990,7 +990,6 @@ GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
 #work, so this target also represents creating the COREDIR and filling it
 HAVE_COREDIR	= $(COREDIR)\ppport.h
 
-
 MICROCORE_OBJ	= $(MICROCORE_SRC:db:+$(o))
 CORE_OBJ	= $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
 WIN32_OBJ	= $(WIN32_SRC:db:+$(o))
@@ -1064,7 +1063,7 @@ CFG_VARS	=					\
 # Top targets
 #
 
-all : CHECKDMAKE  rebasePE Extensions_nonxs $(PERLSTATIC)
+all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC)
 
 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
 
@@ -1093,9 +1092,8 @@ $(GLOBEXE) : perlglob.c
 	$(LIBFILES) && $(EMBED_EXE_MANI)
 .ENDIF
 
-
 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
-	cd .. && miniperl -Ilib make_patchnum.pl
+	$(MINIPERL) -I..\lib ..\make_patchnum.pl
 
 # make sure that we recompile perl.c if the git version changes
 ..\perl$(o) : ..\git_version.h
@@ -1116,13 +1114,10 @@ regen_config_h:
 	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
 	rename config.h $(CFGH_TMPL)
 
-$(CONFIGPM): ..\config.sh config_h.PL
+$(CONFIGPM) .\config.h .UPDATEALL: ..\config.sh config_h.PL
 	$(MINIPERL) -I..\lib ..\configpm --chdir=..
-	$(XCOPY) config.h $(COREDIR)\*.*
 	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
 
-.\config.h : $(CONFIGPM)
-
 # See the comment in Makefile.SH explaining this seemingly cranky ordering
 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
 .IF "$(CCTYPE)" == "GCC"
@@ -1346,16 +1341,12 @@ perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
 	$(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
 	$(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
 
-$(PERLIMPLIB) : perldll.def
+$(PERLEXPLIB) $(PERLIMPLIB) .UPDATEALL : perldll.def
 .IF "$(CCTYPE)" == "GCC"
 	$(IMPLIB) -k -d perldll.def -l $(PERLIMPLIB)
 .ELSE #VC family
 	lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB)
 .ENDIF
-	$(XCOPY) $(PERLIMPLIB) $(COREDIR)
-
-#PERLEXPLIB is built in PERLIMPLIB
-$(PERLEXPLIB): $(PERLIMPLIB)
 
 $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
 .IF "$(CCTYPE)" == "GCC"
@@ -1416,17 +1407,11 @@ $(COREDIR)\ppport.h : $(CORE_H)
 	$(XCOPY) *.h $(COREDIR)\*.* && $(RCOPY) include $(COREDIR)\*.* && $(XCOPY) ..\*.h $(COREDIR)\*.*
 	rem. > $@
 
-perlmain.c : runperl.c
-	copy runperl.c perlmain.c
-
-perlmain$(o) : $(CONFIGPM) perlmain.c
-	$(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ $(PDBOUT) -c perlmain.c
+perlmain$(o) : runperl.c $(CONFIGPM)
+	$(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 
-perlmainst.c : runperl.c
-	copy runperl.c perlmainst.c
-
-perlmainst$(o) : $(CONFIGPM) perlmainst.c
-	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c perlmainst.c
+perlmainst$(o) : runperl.c $(CONFIGPM)
+	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 
 $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
 .IF "$(CCTYPE)" == "GCC"
@@ -1485,9 +1470,9 @@ Extensions_realclean :
 # be running in parallel like UNIDATAFILES, this target a placeholder for the
 # future
 .IF "$(BUILD_STATIC)"=="define"
-rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(GLOBEXE) $(PERLEXESTATIC)
+rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(PERLEXESTATIC)
 .ELSE
-rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(GLOBEXE)
+rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE)
 .ENDIF
 	$(NOOP)
 
@@ -1544,7 +1529,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
 	$(MINIPERL) -I..\lib ..\autodoc.pl ..
 	$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
 
-..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs ..\pod\perluniprops.pod utils
+..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs Extensions_normalize utils
 	$(PERLEXE) -f ..\pod\buildtoc -q
 
 # Note that the pod cleanup in this next section is parsed (and regenerated
@@ -1683,9 +1668,8 @@ installhtml : doc
 inst_lib : $(CONFIGPM)
 	$(RCOPY) ..\lib $(INST_LIB)\*.*
 
-$(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(CONFIGPM) ..\lib\unicore\mktables
-	cd ..\lib\unicore && \
-	..\$(MINIPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p
+$(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : ..\lib\unicore\mktables $(CONFIGPM)
+	$(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
 
 minitest : .\config.h $(HAVEMINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) $(TESTPREPGCC)
 	$(XCOPY) $(MINIPERL) ..\t\$(NULL)
@@ -1774,8 +1758,6 @@ _clean :
 	-@erase *.pdb ..\*.pdb
 	-@erase Extensions_static
 
-
-
 clean : Extensions_clean _clean
 
 realclean : Extensions_realclean _clean
@@ -1784,14 +1766,15 @@ realclean : Extensions_realclean _clean
 # installed perlbug. We don't re-run the tests here - we trust the user.
 # Please *don't* use this unless all tests pass.
 # If you want to report test failures, use "dmake nok" instead.
-ok: utils
+ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
 
-okfile: utils
+okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
 
-nok: utils
+nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
 
-nokfile: utils
+nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok
+
-- 
1.9.5.msysgit.1

@p5pRT
Copy link
Author

p5pRT commented Nov 14, 2015

From @bulk88

On Fri Nov 13 11​:27​:10 2015, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.40 running under perl 5.23.5.

-----------------------------------------------------------------
[Please describe your issue here]

See attached patches.

The parallelness to gnumakefile patch is failing tests, do not apply. I will have to revise it.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Nov 20, 2015

From @bulk88

On Sat Nov 14 12​:18​:17 2015, bulk88 wrote​:

On Fri Nov 13 11​:27​:10 2015, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.40 running under perl 5.23.5.

-----------------------------------------------------------------
[Please describe your issue here]

See attached patches.

The parallelness to gnumakefile patch is failing tests, do not apply.
I will have to revise it.

The fixes were related to the changes to libperl***.a/perl****.lib and their relationship to the CORE dir and a parallel build race condition related to libperl***.a's lifecycle.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Nov 20, 2015

From @bulk88

0001-Cache-is_make_type.patch
From 0a9c31fed9356c659cfd4631354732de957f6922 Mon Sep 17 00:00:00 2001
From: Ed J <mohawk2@users.noreply.github.com>
Date: Mon, 19 Jan 2015 00:17:31 +0000
Subject: [PATCH 1/5] Cache is_make_type

---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 19 ++++++++++++++-----
 cpan/ExtUtils-MakeMaker/t/cd.t                 |  2 ++
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
index 570ea72..154f784 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
@@ -202,19 +202,28 @@ Returns true if C<<$self->make>> is the given type; possibilities are:
 
 =cut
 
+my %maketype2true;
+# undocumented - so t/cd.t can still do its thing
+sub _clear_maketype_cache { %maketype2true = () }
+
 sub is_make_type {
     my($self, $type) = @_;
+    return $maketype2true{$type} if defined $maketype2true{$type};
     (undef, undef, my $make_basename) = $self->splitpath($self->make);
-    return 1 if $make_basename =~ /\b$type\b/i; # executable's filename
-    return 0 if $make_basename =~ /\b(dmake|nmake)\b/i; # Never fall through for dmake/nmake
+    return $maketype2true{$type} = 1
+        if $make_basename =~ /\b$type\b/i; # executable's filename
+    return $maketype2true{$type} = 0
+        if $make_basename =~ /\b(dmake|nmake|gmake)\b/i; # Never fall through for dmake/nmake/gmake
     # now have to run with "-v" and guess
     my $redirect = $self->can_redirect_error ? '2>&1' : '';
     my $make = $self->make || $self->{MAKE};
     my $minus_v = `"$make" -v $redirect`;
-    return 1 if $type eq 'gmake' and $minus_v =~ /GNU make/i;
-    return 1 if $type eq 'bsdmake'
+    return $maketype2true{$type} = 1
+        if $type eq 'gmake' and $minus_v =~ /GNU make/i;
+    return $maketype2true{$type} = 1
+        if $type eq 'bsdmake'
       and $minus_v =~ /^usage: make \[-BeikNnqrstWwX\]/im;
-    0; # it wasn't whatever you asked
+    $maketype2true{$type} = 0; # it wasn't whatever you asked
 }
 
 
diff --git a/cpan/ExtUtils-MakeMaker/t/cd.t b/cpan/ExtUtils-MakeMaker/t/cd.t
index 16f6667..67dfd98 100644
--- a/cpan/ExtUtils-MakeMaker/t/cd.t
+++ b/cpan/ExtUtils-MakeMaker/t/cd.t
@@ -26,6 +26,7 @@ my @cd_args = ($dir, "command1", "command2");
 
     {
         local *make = sub { "nmake" };
+        $mm->_clear_maketype_cache;
 
         my @dirs = (File::Spec->updir) x 2;
         my $expected_updir = File::Spec->catdir(@dirs);
@@ -39,6 +40,7 @@ qq{cd $dir
 
     {
         local *make = sub { "dmake" };
+        $mm->_clear_maketype_cache;
 
         ::is $mm->cd(@cd_args),
 qq{cd $dir && command1
-- 
1.8.0.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Nov 20, 2015

From @bulk88

0002-Optimise-is_make_type-RE.patch
From c450a5eda4dfd78cc244aa7b8214e70f2fce5448 Mon Sep 17 00:00:00 2001
From: Ed J <mohawk2@users.noreply.github.com>
Date: Mon, 19 Jan 2015 13:09:09 +0000
Subject: [PATCH 2/5] Optimise is_make_type RE

---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
index 154f784..bd8ab3b 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
@@ -213,7 +213,7 @@ sub is_make_type {
     return $maketype2true{$type} = 1
         if $make_basename =~ /\b$type\b/i; # executable's filename
     return $maketype2true{$type} = 0
-        if $make_basename =~ /\b(dmake|nmake|gmake)\b/i; # Never fall through for dmake/nmake/gmake
+        if $make_basename =~ /\b[gdn]make\b/i; # Never fall through for dmake/nmake/gmake
     # now have to run with "-v" and guess
     my $redirect = $self->can_redirect_error ? '2>&1' : '';
     my $make = $self->make || $self->{MAKE};
-- 
1.8.0.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Nov 20, 2015

From @bulk88

0003-Win32-gmake-needs-SHELL-to-be-specified.patch
From ee7026b2d574e3d97fda23ad92acbb700e795243 Mon Sep 17 00:00:00 2001
From: Sisyphus <sisyphus@cpan.org>
Date: Tue, 30 Dec 2014 12:56:58 +1100
Subject: [PATCH 3/5] Win32 gmake needs SHELL to be specified

Signed-off-by: Ed J <mohawk2@users.noreply.github.com>
---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm  | 17 ++++++++++++++---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm | 11 +++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index 535b1f3..d0e4410 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -317,8 +317,8 @@ sub const_cccmd {
 
 =item const_config (o)
 
-Defines a couple of constants in the Makefile that are imported from
-%Config.
+Sets SHELL if needed, then defines a couple of constants in the Makefile
+that are imported from %Config.
 
 =cut
 
@@ -326,7 +326,8 @@ sub const_config {
 # --- Constants Sections ---
 
     my($self) = shift;
-    my @m = <<"END";
+    my @m = $self->specify_shell(); # Usually returns empty string
+    push @m, <<"END";
 
 # These definitions are from config.sh (via $INC{'Config.pm'}).
 # They may have been overridden via Makefile.PL or on the command line.
@@ -3176,6 +3177,16 @@ MAKE_FRAG
     return $m;
 }
 
+=item specify_shell
+
+Specify SHELL if needed - not done on Unix.
+
+=cut
+
+sub specify_shell {
+  return '';
+}
+
 =item quote_paren
 
 Backslashes parentheses C<()> in command line arguments.
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
index 47ce479..852223b 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
@@ -232,6 +232,17 @@ sub platform_constants {
     return $make_frag;
 }
 
+=item specify_shell
+
+Set SHELL to $ENV{COMSPEC} only if make is type 'gmake'.
+
+=cut
+
+sub specify_shell {
+    my $self = shift;
+    return '' unless $self->is_make_type('gmake');
+    "\nSHELL = $ENV{COMSPEC}\n";
+}
 
 =item constants
 
-- 
1.8.0.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Nov 20, 2015

From @bulk88

0004-backport-EUMM-commits.patch
From bab3f35dd24c0cf28324b418f76b24a195f6e369 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Tue, 10 Nov 2015 00:57:55 -0500
Subject: [PATCH 4/5] backport EUMM commits

-commit "Cache is_make_type" and "Optimise is_make_type RE" stops 40
 executions of "gmake.exe -v" process for each Makefile.PL run, these 40
 make process launches make it it very difficult to debug make_ext.pl
 and the make tool with a system call logger, see Perl RT #123440 ticket
 for details

-commit "Win32 gmake needs SHELL to be specified" allows Win32 perl to be
 built with gmake, if msysgit is in the PATH env var, without this patch
 gmake will use bash as the shell instead of cmd.exe and no EUMM modules
 can be built during a Win32 perl build, since bash and cmd.exe command
 line strings are not compatible with each other, see Perl RT #123440
 ticket for details
---
 AUTHORS                                                         | 1 +
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm              | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm                 | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm             | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm                      | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm                 | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm               | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm               | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm                | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm                 | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm                 | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm                  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm                | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm                | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm                      | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm               | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm        | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod          | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod     | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm       | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm             | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm              | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm                 | 2 +-
 t/porting/customized.dat                                        | 4 ++--
 32 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index ebd9222..3acc6cf 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -371,6 +371,7 @@ Duncan Findlay			<duncf@debian.org>
 E. Choroba			<choroba@cpan.org>
 Ed Avis				<eda@waniasset.com>
 Ed J				<etj@cpan.org>
+Ed J				<mohawk2@users.noreply.github.com>
 Ed Mooring			<mooring@Lynx.COM>
 Ed Santiago			<esm@pobox.com>
 Eddy Tan			<eddy.net@gmail.com>
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
index 6c1898d..9184471 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
@@ -10,7 +10,7 @@ our @ISA = qw(Exporter);
 
 our @EXPORT  = qw(test_harness pod2man perllocal_install uninstall
                   warn_if_old_packlist test_s cp_nonempty);
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 my $Is_VMS = $^O eq 'VMS';
 
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
index f856657..3bb49d2 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
@@ -2,7 +2,7 @@ package ExtUtils::Liblist;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use File::Spec;
 require ExtUtils::Liblist::Kid;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
index c56f539..43d554e 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
@@ -11,7 +11,7 @@ use 5.006;
 
 use strict;
 use warnings;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use ExtUtils::MakeMaker::Config;
 use Cwd 'cwd';
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
index c58e0a5..fa5f72c 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
@@ -3,7 +3,7 @@ package ExtUtils::MM;
 use strict;
 use ExtUtils::MakeMaker::Config;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::Liblist;
 require ExtUtils::MakeMaker;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
index 2e0739d..ec3a2fc 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_AIX;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
index bd8ab3b..129ad9e 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_Any;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use Carp;
 use File::Spec;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
index 847d833..801b035 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
@@ -26,7 +26,7 @@ require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
 
 our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 
 =item os_flavor
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
index 72cccb8..a9331ff 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
@@ -9,7 +9,7 @@ require ExtUtils::MM_Unix;
 require ExtUtils::MM_Win32;
 our @ISA = qw( ExtUtils::MM_Unix );
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 
 =head1 NAME
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
index ab3e9d8..c6ffc59 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
@@ -2,7 +2,7 @@ package ExtUtils::MM_DOS;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
index 8d189b5..cc52f1d 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
@@ -7,7 +7,7 @@ BEGIN {
     our @ISA = qw( ExtUtils::MM_Unix );
 }
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 
 =head1 NAME
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
index 27983f4..820ffd1 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
@@ -2,7 +2,7 @@ package ExtUtils::MM_MacOS;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 sub new {
     die 'MacOS Classic (MacPerl) is no longer supported by MakeMaker';
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
index a236d11..0b89a15 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
@@ -22,7 +22,7 @@ use strict;
 use ExtUtils::MakeMaker::Config;
 use File::Basename;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Win32;
 our @ISA = qw(ExtUtils::MM_Win32);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
index 2730ee3..2c64ac4 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
@@ -5,7 +5,7 @@ use strict;
 use ExtUtils::MakeMaker qw(neatvalue);
 use File::Spec;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
index 588c7ee..71c4bd5 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_QNX;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
index 9ff061a..2350482 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_UWIN;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index d0e4410..e24a61b 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -15,7 +15,7 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue);
 
 # If we make $VERSION an our variable parse_version() breaks
 use vars qw($VERSION);
-$VERSION = '7.10';
+$VERSION = '7.10_01';
 $VERSION = eval $VERSION;  ## no critic [BuiltinFunctions::ProhibitStringyEval]
 
 require ExtUtils::MM_Any;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
index 9b2f964..fab18df 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
@@ -15,7 +15,7 @@ BEGIN {
 
 use File::Basename;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
index 77fe4f9..57d5e32 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
@@ -1,7 +1,7 @@
 package ExtUtils::MM_VOS;
 
 use strict;
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
index 852223b..1c6921c 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
@@ -27,7 +27,7 @@ use ExtUtils::MakeMaker qw( neatvalue );
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
 our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 $ENV{EMXSHELL} = 'sh'; # to run `commands`
 
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
index f36e23f..2c31d7c 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
@@ -2,7 +2,7 @@ package ExtUtils::MM_Win95;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require ExtUtils::MM_Win32;
 our @ISA = qw(ExtUtils::MM_Win32);
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
index a100b0b..3973e37 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
@@ -3,7 +3,7 @@ package ExtUtils::MY;
 use strict;
 require ExtUtils::MM;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 our @ISA = qw(ExtUtils::MM);
 
 {
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
index 4f9d46f..f9fb8fe 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
@@ -24,7 +24,7 @@ my %Recognized_Att_Keys;
 our %macro_fsentity; # whether a macro is a filesystem name
 our %macro_dep; # whether a macro is a dependency
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 $VERSION = eval $VERSION;  ## no critic [BuiltinFunctions::ProhibitStringyEval]
 
 # Emulate something resembling CVS $Revision$
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm
index d469870..3b96836 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm
@@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Config;
 
 use strict;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use Config ();
 
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
index ac14d0d..d3aa100 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
@@ -1,6 +1,6 @@
 package ExtUtils::MakeMaker::FAQ;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 1;
 __END__
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod
index d5679a3..7e53baa 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod
@@ -1,6 +1,6 @@
 package ExtUtils::MakeMaker::Tutorial;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 
 =head1 NAME
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm
index 07743f0..35cd2ab 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm
@@ -15,7 +15,7 @@ use strict;
 
 use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
 
-$VERSION = '7.10';
+$VERSION = '7.10_01';
 $CLASS = 'version';
 
 {
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm
index be083b3..a0213b1 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm
@@ -10,7 +10,7 @@ use strict;
 
 use vars qw($VERSION $CLASS $STRICT $LAX);
 
-$VERSION = '7.10';
+$VERSION = '7.10_01';
 
 #--------------------------------------------------------------------------#
 # Version regexp components
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
index 74c9199..a393329 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
@@ -3,7 +3,7 @@ package ExtUtils::Mkbootstrap;
 # There's just too much Dynaloader incest here to turn on strict vars.
 use strict 'refs';
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 require Exporter;
 our @ISA = ('Exporter');
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
index 09e058e..b80310e 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
@@ -10,7 +10,7 @@ use Config;
 
 our @ISA = qw(Exporter);
 our @EXPORT = qw(&Mksymlists);
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 sub Mksymlists {
     my(%spec) = @_;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
index 74bce3d..6f5d870 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
@@ -3,7 +3,7 @@ package ExtUtils::testlib;
 use strict;
 use warnings;
 
-our $VERSION = '7.10';
+our $VERSION = '7.10_01';
 
 use Cwd;
 use File::Spec;
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index f64c73a..a29d836 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -2,8 +2,8 @@ CPAN cpan/CPAN/lib/CPAN.pm ce62c43d72f101c011184dbbc59e21c2790826f0
 Encode cpan/Encode/Encode.xs ef106510cceba35eaae4c52127116162f5d7260f
 Encode cpan/Encode/encoding.pm 51c19efc9bfe8467d6ae12a4654f6e7f980715bf
 Encode cpan/Encode/Unicode/Unicode.xs c7ab75e09f6b2685060d3c0bd091862fc2d31724
-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm fd048a43fc1a53acbe133bd96ddbf1421cfb28cf
-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm 0c78ba02d6249dfcca12ac9886a7c7cfb60e77fe
+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 830acdc810e2974d7fd4ec408ea1bfa825c75b69
+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm 1997912b5018970cdeb3dae8fd7e0c24f6e5d567
 ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/prereq.t 53bda2c549fd13a6b6c13a070ca6bc79883081c0
 ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/vstrings.t 90035a2bdbf45f15b9c3196d072d7cba7e662871
 Math::BigRat cpan/Math-BigRat/lib/Math/BigRat.pm 682352dde33638125ce12ca44990bd1cd44af4f8
-- 
1.8.0.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Nov 20, 2015

From @bulk88

0005-add-parallelness-to-win32-GNUmakefile.patch
From 0515393a290b0c0379cfb9ee850f0784d356139a Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Wed, 18 Nov 2015 21:25:29 -0500
Subject: [PATCH 5/5] add parallelness to win32/GNUmakefile

-.UPDATEALL is dmake only, doesn't exist in gmake, create more targets
 instead
GNUmakefile:1319: warning: overriding recipe for target '.UPDATEALL'
GNUmakefile:1024: warning: ignoring old recipe for target '.UPDATEALL'
-fix ok/nok targets on dmake and gmake
-modify whitespace and comments between 2 makesfiles so there are less
 delta lines if the 2 are diffed, this aids in diagnostics
-remove perlmainst.c/perlmain.c build products, just use runperl.c directly
 1 less disk file to create and later clean and git status and 2 less nodes
 in the make graph to traverse, also better for C debugger, since
 "runperl.c" is around after a git clean of the source tree, and runperl.c
 is in every single callstack in perl.
-remove copying mini config.h to CORE dir, pointless since (mini) config.h
 isn't an input to config_h.PL, remove the exit 1 from commit 137443ea0a
 from 5.003, rewriting config.h is not a reason to stop the build with a
 fatal error, vivify CORE dir or else sub copy() fails
-deshell UNIDATAFILES/mktables, 1 less cmd.exe process and 1 less .bat file
 written to disk for gmake (dmake always uses cmd.exe ATM)
-combining mini config.h AKA $(MINIDIR)\.exists shell append lines is for
 another commit
-perlglob.exe is not installed, it doesn't need to be rebased, it is only
 needed for module building, removing the dep makes the dep graph simpler
-rename PERLIMPLIB so the lib is built in its final location in CORE dir
 this removes an extra xcopy process run. Since perl dll's .a/.lib
 is not longer in the root of the source tree, change the 2 tests to look
 at the uninstalled final location dir, not the root dir.
-for GCC PERLEXPLIB must be used, passing "perldll.def" on cmd line to g++
 means all data globals with EXTCONST are exported (which have dllexport
 on their declaration) instead of just what is in perldll.def and
 globvar.sym, INTERN/EXTERN.h could be revised to fix that, but I am not
 doing that at this time. Also drop linking GCC perl523.dll from 3
 processes to just 1 process like with VC builds. Removing 2nd run of
 dlltool fixes a race condition where libperl523.a was generated twice.
 This caused a race condition failure where linking a XS DLL failed
 because the GCC linker of the XS DLL saw a partially written
 libperl523.a.
-Relocation was tested with $(LINK32) -v -mdll -o $@
 -Wl,--disable-auto-image-base -Wl,--image-base -Wl,0x400000
 $(BLINK_FLAGS) $(PERLDLL_OBJ) $(shell @type Extensions_static)
 $(LIBFILES) $(PERLEXPLIB)
 to g++ linker to force an address conflict and verified with VMMap
 (unrelocated perl523.dll has ~40KB private memory, relocated has ~240KB
 private memory on Win 7 32b), historically there are problems with
 dllexport and dlltool and relocation problems with mingw
-$(COREDIR)\ppport.h in gmake is separate lines since gmake normally
 launches processes directly, not through the shell, so it is more
 efficent to keep it as multiple lines for gmake, while dmake likes to
 burn CPU and IO between each line, and runs each line through cmd.exe
---
 README.win32                                       |   8 +-
 dist/ExtUtils-CBuilder/Changes                     |   2 +-
 dist/ExtUtils-CBuilder/Makefile.PL                 |   2 +-
 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm    |   2 +-
 .../lib/ExtUtils/CBuilder/Base.pm                  |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/Unix.pm         |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/VMS.pm          |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/Windows.pm      |   4 +-
 .../lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm  |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm  |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/aix.pm          |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/android.pm      |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/cygwin.pm       |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/darwin.pm       |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/dec_osf.pm      |   2 +-
 .../lib/ExtUtils/CBuilder/Platform/os2.pm          |   2 +-
 lib/ExtUtils/t/Embed.t                             |   4 +-
 win32/GNUmakefile                                  | 600 +++++++++++----------
 win32/config_h.PL                                  |  14 +-
 win32/makefile.mk                                  |  78 +--
 21 files changed, 375 insertions(+), 363 deletions(-)

diff --git a/README.win32 b/README.win32
index 6726019..2479433 100644
--- a/README.win32
+++ b/README.win32
@@ -101,10 +101,10 @@ or Windows SDK. You may also use, for Visual C++ or Windows SDK, dmake instead
 of nmake.  dmake is open source software, but is not included with Visual C++ or
 Windows SDK.  Builds using gcc need dmake or gmake.  nmake is not supported for
 gcc builds.  gmake only supports gcc builds, not any other compiler.
-Parallel building is only supported with dmake with any compiler.  It is
-recommended to use dmake 4.13 or newer for parallel building.  Older dmakes,
-in parallel mode, have very high CPU usage and pound the disk/filing system
-with duplicate I/O calls in an aggressive polling loop.
+Parallel building is only supported with dmake and gmake, not nmake.  When using
+dmake it is recommended to use dmake 4.13 or newer for parallel building.
+Older dmakes, in parallel mode, have very high CPU usage and pound the
+disk/filing system with duplicate I/O calls in an aggressive polling loop.
 
 A port of dmake for Windows is available from:
 
diff --git a/dist/ExtUtils-CBuilder/Changes b/dist/ExtUtils-CBuilder/Changes
index 27f3bc3..f4654cd 100644
--- a/dist/ExtUtils-CBuilder/Changes
+++ b/dist/ExtUtils-CBuilder/Changes
@@ -1,6 +1,6 @@
 Revision history for Perl extension ExtUtils::CBuilder.
 
-0.282224 - 2015-10-09
+0.280224 - 2015-10-09
 
   Enhncements:
 
diff --git a/dist/ExtUtils-CBuilder/Makefile.PL b/dist/ExtUtils-CBuilder/Makefile.PL
index 820b294..44cb33a 100644
--- a/dist/ExtUtils-CBuilder/Makefile.PL
+++ b/dist/ExtUtils-CBuilder/Makefile.PL
@@ -29,7 +29,7 @@ my %WriteMakefileArgs = (
   "TEST_REQUIRES" => {
     "Test::More" => "0.47"
   },
-  "VERSION" => "0.280224",
+  "VERSION" => "0.280225",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
index abe976e..6ce0c68 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder;
-$ExtUtils::CBuilder::VERSION = '0.280224';
+$ExtUtils::CBuilder::VERSION = '0.280225';
 use File::Spec ();
 use File::Path ();
 use File::Basename ();
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
index eb4c175..60b2f43 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Base;
-$ExtUtils::CBuilder::Base::VERSION = '0.280224';
+$ExtUtils::CBuilder::Base::VERSION = '0.280225';
 use strict;
 use warnings;
 use File::Spec;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
index d6c1768..399e254 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::Unix;
-$ExtUtils::CBuilder::Platform::Unix::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::Unix::VERSION = '0.280225';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Base;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
index 194d888..e9d9f6f 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::VMS;
-$ExtUtils::CBuilder::Platform::VMS::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::VMS::VERSION = '0.280225';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Base;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
index b95592d..80b8f29 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::Windows;
-$ExtUtils::CBuilder::Platform::Windows::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::Windows::VERSION = '0.280225';
 use strict;
 use warnings;
 
@@ -151,7 +151,7 @@ sub link {
   # if running in perl source tree, look for libs there, not installed
   my $lddlflags = $cf->{lddlflags};
   my $perl_src = $self->perl_src();
-  $lddlflags =~ s/\Q$cf->{archlibexp}\E[\\\/]CORE/$perl_src/ if $perl_src;
+  $lddlflags =~ s/\Q$cf->{archlibexp}\E[\\\/]CORE/$perl_src\/lib\/CORE/ if $perl_src;
 
   my %spec = (
     srcdir        => $to,
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
index cd93b72..513c4ac 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::Windows::BCC;
-$ExtUtils::CBuilder::Platform::Windows::BCC::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::Windows::BCC::VERSION = '0.280225';
 use strict;
 use warnings;
 
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
index 5f219f2..19851df 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::Windows::GCC;
-$ExtUtils::CBuilder::Platform::Windows::GCC::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::Windows::GCC::VERSION = '0.280225';
 use warnings;
 use strict;
 
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
index f14988e..c8d675f 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::Windows::MSVC;
-$ExtUtils::CBuilder::Platform::Windows::MSVC::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::Windows::MSVC::VERSION = '0.280225';
 use warnings;
 use strict;
 
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
index 949ef53..488d3e6 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::aix;
-$ExtUtils::CBuilder::Platform::aix::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::aix::VERSION = '0.280225';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Platform::Unix;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
index 5940922..b9e6af3 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::android;
-$ExtUtils::CBuilder::Platform::android::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::android::VERSION = '0.280225';
 use warnings;
 use strict;
 use File::Spec;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
index c020e44..339840f 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::cygwin;
-$ExtUtils::CBuilder::Platform::cygwin::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::cygwin::VERSION = '0.280225';
 use warnings;
 use strict;
 use File::Spec;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
index 324c268..04a87da 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::darwin;
-$ExtUtils::CBuilder::Platform::darwin::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::darwin::VERSION = '0.280225';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Platform::Unix;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
index 0eb098f..d503e86 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::dec_osf;
-$ExtUtils::CBuilder::Platform::dec_osf::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::dec_osf::VERSION = '0.280225';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Platform::Unix;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm
index 19047b9..8d0e3eb 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm
@@ -1,5 +1,5 @@
 package ExtUtils::CBuilder::Platform::os2;
-$ExtUtils::CBuilder::Platform::os2::VERSION = '0.280224';
+$ExtUtils::CBuilder::Platform::os2::VERSION = '0.280225';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Platform::Unix;
diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t
index ffa70eb..59d7921 100644
--- a/lib/ExtUtils/t/Embed.t
+++ b/lib/ExtUtils/t/Embed.t
@@ -87,10 +87,10 @@ if ($^O eq 'VMS') {
     $inc = File::Spec->catdir($inc,'include');
     push(@cmd,"-I$inc");
     if ($cc eq 'cl') {
-	push(@cmd,'-link',"-libpath:$lib",$Config{'libperl'},$Config{'libs'});
+	push(@cmd,'-link',"-libpath:$lib\\lib\\CORE",$Config{'libperl'},$Config{'libs'});
     }
     else {
-	push(@cmd,"-L$lib",File::Spec->catfile($lib,$Config{'libperl'}),$Config{'libc'});
+	push(@cmd,"-L$lib",$lib.'\lib\CORE\\'.$Config{'libperl'},$Config{'libc'});
     }
    }
    elsif ($^O eq 'os390' && $Config{usedl}) {
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 120ead7..844cda6 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -138,7 +138,14 @@ USE_LARGE_FILES	:= define
 #USE_LONG_DOUBLE :=define
 
 #
-# uncomment next line if you want debug version of perl (big,slow)
+# Uncomment this if you want to disable looking up values from
+# HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
+# the Registry.
+#
+#USE_NO_REGISTRY := define
+
+#
+# uncomment next line if you want debug version of perl (big/slow)
 # If not enabled, we automatically try to use maximum optimization
 # with all compilers that are known to have a working optimizer.
 #
@@ -264,6 +271,7 @@ USE_PERLIO	?= undef
 USE_LARGE_FILES	?= undef
 USE_64_BIT_INT	?= undef
 USE_LONG_DOUBLE	?= undef
+USE_NO_REGISTRY	?= undef
 
 ifeq ($(USE_IMP_SYS),define)
 PERL_MALLOC	= undef
@@ -297,6 +305,10 @@ ifneq ($(USE_IMP_SYS),undef)
 BUILDOPT	+= -DPERL_IMPLICIT_SYS
 endif
 
+ifeq ($(USE_NO_REGISTRY),define)
+BUILDOPT	+= -DWIN32_NO_REGISTRY
+endif
+
 ifeq ($(WIN64),define)
 USE_64_BIT_INT	= define
 endif
@@ -382,7 +394,7 @@ a = .a
 # Options
 #
 
-INCLUDES	= -I.\include -I. -I.. -I$(COREDIR)
+INCLUDES	= -I.\include -I. -I..
 DEFINES		= -DWIN32
 ifeq ($(WIN64),define)
 DEFINES		+= -DWIN64 -DCONSERVATIVE
@@ -391,11 +403,9 @@ LOCDEFS		= -DPERLDLL -DPERL_CORE
 SUBSYS		= console
 CXX_FLAG	= -xc++
 LIBC		=
-LIBFILES	= $(LIBC) \
-		  -lmoldname -lkernel32 -luser32 -lgdi32 \
-		  -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
-		  -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
-		  -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
+LIBFILES	= $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \
+	-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \
+	-luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
 
 ifeq ($(CFG),Debug)
 OPTIMIZE	= -g -O2 -DDEBUGGING
@@ -411,6 +421,7 @@ LINK_FLAGS	= $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
 OBJOUT_FLAG	= -o
 EXEOUT_FLAG	= -o
 LIBOUT_FLAG	=
+PDBOUT		=
 
 BUILDOPT	+= -fno-strict-aliasing -mms-bitfields
 MINIBUILDOPT	+= -fno-strict-aliasing
@@ -443,14 +454,19 @@ BLINK_FLAGS	= $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
 
 #
 # various targets
+
+#do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL)
+#$(MINIPERL) is not a buildable target, use "gmake mp" if you want to just build
+#miniperl alone
 MINIPERL	= ..\miniperl.exe
+HAVEMINIPERL	= ..\lib\buildcustomize.pl
 MINIDIR		= mini
 PERLEXE		= ..\perl.exe
 WPERLEXE	= ..\wperl.exe
 PERLEXESTATIC	= ..\perl-static.exe
 STATICDIR	= .\static.tmp
 GLOBEXE		= ..\perlglob.exe
-CONFIGPM	= ..\lib\Config.pm ..\lib\Config_heavy.pl
+CONFIGPM	= ..\lib\Config.pm
 GENUUDMAP	= ..\generate_uudmap.exe
 ifeq ($(BUILD_STATIC),define)
 PERLSTATIC	= static
@@ -481,7 +497,7 @@ PERLDLL_RES	=
 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
 # on and really only the interface - i.e. the .def file used to export symbols
 # from the .dll
-PERLDEP = perldll.def
+PERLDEP = $(PERLIMPLIB)
 
 
 PL2BAT		= bin\pl2bat.pl
@@ -498,6 +514,7 @@ UTILS		=			\
 		..\utils\perlivp	\
 		..\utils\libnetcfg	\
 		..\utils\enc2xs		\
+		..\utils\encguess	\
 		..\utils\piconv		\
 		..\utils\corelist	\
 		..\utils\cpan		\
@@ -519,57 +536,72 @@ UTILS		=			\
 
 CFGSH_TMPL	= config.gc
 CFGH_TMPL	= config_H.gc
-PERLIMPLIB	= ..\libperl523$(a)
+PERLIMPLIB	= $(COREDIR)\libperl523$(a)
+PERLIMPLIBBASE	= libperl523$(a)
 PERLSTATICLIB	= ..\libperl523s$(a)
 INT64		= long long
 
 # makedef.pl must be updated if this changes, and this should normally
 # only change when there is an incompatible revision of the public API.
+PERLEXPLIB	= $(COREDIR)\perl523.exp
 PERLDLL		= ..\perl523.dll
 
+#EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel
+#$(MAKE) will contain the -P that this makefile was called with, which is bad for
+#make_ext.pl since upto jobs*jobs processes will run instead of jobs
+#also any recipie containing $(MAKE) is special cased by dmake to execute recipes
+#containing $(MAKE) when "dmake -n" is executed, which causes recursive calls
+#to dmake, which means "dmake -n" is then broken as a diagnostic tool since
+#"dmake -n" will invoke all the make_ext.pl scripts build things instead of
+#showing what to build since $(MAKE) is an arg to make_ext.pl, not an invocation
+#of the dmake process
+PLMAKE		= gmake
+
 XCOPY		= xcopy /f /r /i /d /y
 RCOPY		= xcopy /f /r /i /e /d /y
 NOOP		= @rem
 
+#first ones are arrange in compile time order for faster parallel building
+#see #123867 for details
 MICROCORE_SRC	=		\
+		..\toke.c	\
+		..\regcomp.c	\
+		..\regexec.c	\
+		..\op.c		\
+		..\sv.c		\
+		..\pp.c		\
+		..\pp_ctl.c	\
+		..\pp_sys.c	\
+		..\pp_pack.c	\
+		..\pp_hot.c	\
+		..\gv.c		\
+		..\perl.c	\
+		..\utf8.c	\
+		..\dump.c	\
+		..\hv.c		\
 		..\av.c		\
 		..\caretx.c	\
 		..\deb.c	\
 		..\doio.c	\
 		..\doop.c	\
 		..\dquote.c	\
-		..\dump.c	\
 		..\globals.c	\
-		..\gv.c		\
 		..\mro_core.c	\
-		..\hv.c		\
 		..\locale.c	\
 		..\keywords.c	\
 		..\mathoms.c    \
 		..\mg.c		\
 		..\numeric.c	\
-		..\op.c		\
 		..\pad.c	\
-		..\perl.c	\
 		..\perlapi.c	\
 		..\perly.c	\
-		..\pp.c		\
-		..\pp_ctl.c	\
-		..\pp_hot.c	\
-		..\pp_pack.c	\
 		..\pp_sort.c	\
-		..\pp_sys.c	\
 		..\reentr.c	\
-		..\regcomp.c	\
-		..\regexec.c	\
 		..\run.c	\
 		..\scope.c	\
-		..\sv.c		\
 		..\taint.c	\
 		..\time64.c	\
-		..\toke.c	\
 		..\universal.c	\
-		..\utf8.c	\
 		..\util.c
 
 EXTRACORE_SRC	+= perllib.c
@@ -639,6 +671,9 @@ UUDMAP_H	= ..\uudmap.h
 BITCOUNT_H	= ..\bitcount.h
 MG_DATA_H	= ..\mg_data.h
 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
+#a stub ppport.h must be generated so building XS modules, .c->.obj wise, will
+#work, so this target also represents creating the COREDIR and filling it
+HAVE_COREDIR	= $(COREDIR)\ppport.h
 
 MICROCORE_OBJ	= $(MICROCORE_SRC:.c=.o)
 CORE_OBJ	= $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.o)
@@ -650,7 +685,6 @@ MINICORE_OBJ	= $(subst ..\,mini\,$(MICROCORE_OBJ))	\
 MINIWIN32_OBJ	= $(subst .\,mini\,$(WIN32_OBJ))
 MINI_OBJ	= $(MINICORE_OBJ) $(MINIWIN32_OBJ)
 DLL_OBJ		= $(DYNALOADER)
-GENUUDMAP_OBJ	= $(GENUUDMAP:.exe=.o)
 
 PERLDLL_OBJ	= $(CORE_OBJ)
 PERLEXE_OBJ	= perlmain$(o)
@@ -687,14 +721,15 @@ CFG_VARS	=					\
 		"cc=$(CC)"				\
 		"ld=$(LINK32)"				\
 		"ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT)" \
+		"usecplusplus=$(USE_CPLUSPLUS)"		\
 		"cf_email=$(EMAIL)"			\
 		"d_mymalloc=$(PERL_MALLOC)"		\
 		"libs=$(LIBFILES)"			\
 		"incpath=$(CCINCDIR)"			\
-		"libperl=$(subst ..\,,$(PERLIMPLIB))"	\
+		"libperl=$(PERLIMPLIBBASE)"		\
 		"libpth=$(CCLIBDIR);$(EXTRALIBDIRS)"	\
 		"libc=$(LIBC)"				\
-		"make=$(MAKE)"				\
+		"make=$(PLMAKE)"				\
 		"_o=$(o)"				\
 		"obj_ext=$(o)"				\
 		"_a=$(a)"				\
@@ -719,9 +754,7 @@ CFG_VARS	=					\
 
 .PHONY: all info
 
-all : info .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL)	\
-	$(CONFIGPM) $(UNIDATAFILES) MakePPPort			\
-	$(PERLEXE) Extensions Extensions_nonxs $(PERLSTATIC)
+all : info rebasePE Extensions_nonxs $(PERLSTATIC)
 
 info :
 	@echo # GCCBIN=$(GCCBIN)
@@ -731,20 +764,18 @@ info :
 	@echo # WIN64=$(WIN64)
 	@echo # ARCHITECTURE=$(ARCHITECTURE)
 	@echo # ARCHNAME=$(ARCHNAME)
-	@echo # MAKE=$(MAKE)
+	@echo # MAKE=$(PLMAKE)
 ifeq ($(GCCTARGET),)
 	@echo Unable to detect gcc and/or architecture!
 	@exit 1
 endif
 
 
-regnodes : ..\regnodes.h
-
 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
 
 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
 
-reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL)	\
+reonly : ..\regnodes.h .\config.h ..\git_version.h $(GLOBEXE) $(HAVEMINIPERL)\
 	$(CONFIGPM) $(UNIDATAFILES) $(PERLEXE)				\
 	Extensions_reonly
 
@@ -752,11 +783,45 @@ static: $(PERLEXESTATIC)
 
 #----------------------------------------------------------------
 
-$(GLOBEXE) : perlglob$(o)
-	$(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
+$(GLOBEXE) : perlglob.c
+	$(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
+
+..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
+	$(MINIPERL) -I..\lib ..\make_patchnum.pl
+
+# make sure that we recompile perl.c if the git version changes
+..\perl$(o) : ..\git_version.h
 
-perlglob$(o)  : perlglob.c
+..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL)
+	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
 
+# This target is for when changes to the main config.sh happen.
+# Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
+# with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
+# this target to regenerate config_H.gc.
+regen_config_h:
+	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
+	$(MINIPERL) -I..\lib ..\configpm --chdir=..
+	-del /f $(CFGH_TMPL)
+	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
+	rename config.h $(CFGH_TMPL)
+
+$(CONFIGPM): ..\config.sh config_h.PL
+	$(MINIPERL) -I..\lib ..\configpm --chdir=..
+	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
+
+.\config.h : $(CONFIGPM)
+
+# See the comment in Makefile.SH explaining this seemingly cranky ordering
+..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
+	$(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
+	$(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
+
+#convinence target, get a working miniperl
+mp : $(CONFIGPM)
+
+$(MINIDIR)\.exists : $(CFGH_TMPL)
+	if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
 #
 # Copy the template config.h and set configurables at the end of it
 # as per the options chosen and compiler used.
@@ -766,217 +831,181 @@ perlglob$(o)  : perlglob.c
 # real config.h used to build perl.exe is generated from the top-level
 # config_h.SH by config_h.PL (run by miniperl.exe).
 #
-.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
+# MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd
+# config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ).
 	-del /f config.h
 	copy $(CFGH_TMPL) config.h
-	@echo.>>$@
-	@echo #ifndef _config_h_footer_>>$@
-	@echo #define _config_h_footer_>>$@
-	@echo #undef Off_t>>$@
-	@echo #undef LSEEKSIZE>>$@
-	@echo #undef Off_t_size>>$@
-	@echo #undef PTRSIZE>>$@
-	@echo #undef SSize_t>>$@
-	@echo #undef HAS_ATOLL>>$@
-	@echo #undef HAS_STRTOLL>>$@
-	@echo #undef HAS_STRTOULL>>$@
-	@echo #undef Size_t_size>>$@
-	@echo #undef IVTYPE>>$@
-	@echo #undef UVTYPE>>$@
-	@echo #undef IVSIZE>>$@
-	@echo #undef UVSIZE>>$@
-	@echo #undef NV_PRESERVES_UV>>$@
-	@echo #undef NV_PRESERVES_UV_BITS>>$@
-	@echo #undef IVdf>>$@
-	@echo #undef UVuf>>$@
-	@echo #undef UVof>>$@
-	@echo #undef UVxf>>$@
-	@echo #undef UVXf>>$@
-	@echo #undef USE_64_BIT_INT>>$@
-	@echo #undef Gconvert>>$@
-	@echo #undef HAS_FREXPL>>$@
-	@echo #undef HAS_ISNANL>>$@
-	@echo #undef HAS_MODFL>>$@
-	@echo #undef HAS_MODFL_PROTO>>$@
-	@echo #undef HAS_SQRTL>>$@
-	@echo #undef HAS_STRTOLD>>$@
-	@echo #undef PERL_PRIfldbl>>$@
-	@echo #undef PERL_PRIgldbl>>$@
-	@echo #undef PERL_PRIeldbl>>$@
-	@echo #undef PERL_SCNfldbl>>$@
-	@echo #undef NVTYPE>>$@
-	@echo #undef NVSIZE>>$@
-	@echo #undef LONG_DOUBLESIZE>>$@
-	@echo #undef NV_OVERFLOWS_INTEGERS_AT>>$@
-	@echo #undef NVef>>$@
-	@echo #undef NVff>>$@
-	@echo #undef NVgf>>$@
-	@echo #undef USE_LONG_DOUBLE>>$@
+	@echo.>> config.h
+	@echo #ifndef _config_h_footer_>> config.h
+	@echo #define _config_h_footer_>> config.h
+	@echo #undef Off_t>> config.h
+	@echo #undef LSEEKSIZE>> config.h
+	@echo #undef Off_t_size>> config.h
+	@echo #undef PTRSIZE>> config.h
+	@echo #undef SSize_t>> config.h
+	@echo #undef HAS_ATOLL>> config.h
+	@echo #undef HAS_STRTOLL>> config.h
+	@echo #undef HAS_STRTOULL>> config.h
+	@echo #undef Size_t_size>> config.h
+	@echo #undef IVTYPE>> config.h
+	@echo #undef UVTYPE>> config.h
+	@echo #undef IVSIZE>> config.h
+	@echo #undef UVSIZE>> config.h
+	@echo #undef NV_PRESERVES_UV>> config.h
+	@echo #undef NV_PRESERVES_UV_BITS>> config.h
+	@echo #undef IVdf>> config.h
+	@echo #undef UVuf>> config.h
+	@echo #undef UVof>> config.h
+	@echo #undef UVxf>> config.h
+	@echo #undef UVXf>> config.h
+	@echo #undef USE_64_BIT_INT>> config.h
+	@echo #undef Gconvert>> config.h
+	@echo #undef HAS_FREXPL>> config.h
+	@echo #undef HAS_ISNANL>> config.h
+	@echo #undef HAS_MODFL>> config.h
+	@echo #undef HAS_MODFL_PROTO>> config.h
+	@echo #undef HAS_SQRTL>> config.h
+	@echo #undef HAS_STRTOLD>> config.h
+	@echo #undef PERL_PRIfldbl>> config.h
+	@echo #undef PERL_PRIgldbl>> config.h
+	@echo #undef PERL_PRIeldbl>> config.h
+	@echo #undef PERL_SCNfldbl>> config.h
+	@echo #undef NVTYPE>> config.h
+	@echo #undef NVSIZE>> config.h
+	@echo #undef LONG_DOUBLESIZE>> config.h
+	@echo #undef NV_OVERFLOWS_INTEGERS_AT>> config.h
+	@echo #undef NVef>> config.h
+	@echo #undef NVff>> config.h
+	@echo #undef NVgf>> config.h
+	@echo #undef USE_LONG_DOUBLE>> config.h
 ifeq ($(USE_LARGE_FILES),define)
-	@echo #define Off_t $(INT64)>>$@
-	@echo #define LSEEKSIZE ^8>>$@
-	@echo #define Off_t_size ^8>>$@
+	@echo #define Off_t $(INT64)>> config.h
+	@echo #define LSEEKSIZE ^8>> config.h
+	@echo #define Off_t_size ^8>> config.h
 else
-	@echo #define Off_t long>>$@
-	@echo #define LSEEKSIZE ^4>>$@
-	@echo #define Off_t_size ^4>>$@
+	@echo #define Off_t long>> config.h
+	@echo #define LSEEKSIZE ^4>> config.h
+	@echo #define Off_t_size ^4>> config.h
 endif
 ifeq ($(WIN64),define)
-	@echo #define PTRSIZE ^8>>$@
-	@echo #define SSize_t $(INT64)>>$@
-	@echo #define HAS_ATOLL>>$@
-	@echo #define HAS_STRTOLL>>$@
-	@echo #define HAS_STRTOULL>>$@
-	@echo #define Size_t_size ^8>>$@
+	@echo #define PTRSIZE ^8>> config.h
+	@echo #define SSize_t $(INT64)>> config.h
+	@echo #define HAS_ATOLL>> config.h
+	@echo #define HAS_STRTOLL>> config.h
+	@echo #define HAS_STRTOULL>> config.h
+	@echo #define Size_t_size ^8>> config.h
 else
-	@echo #define PTRSIZE ^4>>$@
-	@echo #define SSize_t int>>$@
-	@echo #undef HAS_ATOLL>>$@
-	@echo #undef HAS_STRTOLL>>$@
-	@echo #undef HAS_STRTOULL>>$@
-	@echo #define Size_t_size ^4>>$@
+	@echo #define PTRSIZE ^4>> config.h
+	@echo #define SSize_t int>> config.h
+	@echo #undef HAS_ATOLL>> config.h
+	@echo #undef HAS_STRTOLL>> config.h
+	@echo #undef HAS_STRTOULL>> config.h
+	@echo #define Size_t_size ^4>> config.h
 endif
 ifeq ($(USE_64_BIT_INT),define)
-	@echo #define IVTYPE $(INT64)>>$@
-	@echo #define UVTYPE unsigned $(INT64)>>$@
-	@echo #define IVSIZE ^8>>$@
-	@echo #define UVSIZE ^8>>$@
+	@echo #define IVTYPE $(INT64)>> config.h
+	@echo #define UVTYPE unsigned $(INT64)>> config.h
+	@echo #define IVSIZE ^8>> config.h
+	@echo #define UVSIZE ^8>> config.h
 ifeq ($(USE_LONG_DOUBLE),define)
-	@echo #define NV_PRESERVES_UV>>$@
-	@echo #define NV_PRESERVES_UV_BITS 64>>$@
+	@echo #define NV_PRESERVES_UV>> config.h
+	@echo #define NV_PRESERVES_UV_BITS 64>> config.h
 else
-	@echo #undef NV_PRESERVES_UV>>$@
-	@echo #define NV_PRESERVES_UV_BITS 53>>$@
+	@echo #undef NV_PRESERVES_UV>> config.h
+	@echo #define NV_PRESERVES_UV_BITS 53>> config.h
 endif
-	@echo #define IVdf "I64d">>$@
-	@echo #define UVuf "I64u">>$@
-	@echo #define UVof "I64o">>$@
-	@echo #define UVxf "I64x">>$@
-	@echo #define UVXf "I64X">>$@
-	@echo #define USE_64_BIT_INT>>$@
+	@echo #define IVdf "I64d">> config.h
+	@echo #define UVuf "I64u">> config.h
+	@echo #define UVof "I64o">> config.h
+	@echo #define UVxf "I64x">> config.h
+	@echo #define UVXf "I64X">> config.h
+	@echo #define USE_64_BIT_INT>> config.h
 else
-	@echo #define IVTYPE long>>$@
-	@echo #define UVTYPE unsigned long>>$@
-	@echo #define IVSIZE ^4>>$@
-	@echo #define UVSIZE ^4>>$@
-	@echo #define NV_PRESERVES_UV>>$@
-	@echo #define NV_PRESERVES_UV_BITS 32>>$@
-	@echo #define IVdf "ld">>$@
-	@echo #define UVuf "lu">>$@
-	@echo #define UVof "lo">>$@
-	@echo #define UVxf "lx">>$@
-	@echo #define UVXf "lX">>$@
-	@echo #undef USE_64_BIT_INT>>$@
+	@echo #define IVTYPE long>> config.h
+	@echo #define UVTYPE unsigned long>> config.h
+	@echo #define IVSIZE ^4>> config.h
+	@echo #define UVSIZE ^4>> config.h
+	@echo #define NV_PRESERVES_UV>> config.h
+	@echo #define NV_PRESERVES_UV_BITS 32>> config.h
+	@echo #define IVdf "ld">> config.h
+	@echo #define UVuf "lu">> config.h
+	@echo #define UVof "lo">> config.h
+	@echo #define UVxf "lx">> config.h
+	@echo #define UVXf "lX">> config.h
+	@echo #undef USE_64_BIT_INT>> config.h
 endif
 ifeq ($(USE_LONG_DOUBLE),define)
-	@echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*""Lg",(n),(x))>>$@
-	@echo #define HAS_FREXPL>>$@
-	@echo #define HAS_ISNANL>>$@
-	@echo #define HAS_MODFL>>$@
-	@echo #define HAS_MODFL_PROTO>>$@
-	@echo #define HAS_SQRTL>>$@
-	@echo #define HAS_STRTOLD>>$@
-	@echo #define PERL_PRIfldbl "Lf">>$@
-	@echo #define PERL_PRIgldbl "Lg">>$@
-	@echo #define PERL_PRIeldbl "Le">>$@
-	@echo #define PERL_SCNfldbl "Lf">>$@
-	@echo #define NVTYPE long double>>$@
+	@echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*""Lg",(n),(x))>> config.h
+	@echo #define HAS_FREXPL>> config.h
+	@echo #define HAS_ISNANL>> config.h
+	@echo #define HAS_MODFL>> config.h
+	@echo #define HAS_MODFL_PROTO>> config.h
+	@echo #define HAS_SQRTL>> config.h
+	@echo #define HAS_STRTOLD>> config.h
+	@echo #define PERL_PRIfldbl "Lf">> config.h
+	@echo #define PERL_PRIgldbl "Lg">> config.h
+	@echo #define PERL_PRIeldbl "Le">> config.h
+	@echo #define PERL_SCNfldbl "Lf">> config.h
+	@echo #define NVTYPE long double>> config.h
 ifeq ($(WIN64),define)
-	@echo #define NVSIZE ^16>>$@
-	@echo #define LONG_DOUBLESIZE ^16>>$@
+	@echo #define NVSIZE ^16>> config.h
+	@echo #define LONG_DOUBLESIZE ^16>> config.h
 else
-	@echo #define NVSIZE ^12>>$@
-	@echo #define LONG_DOUBLESIZE ^12>>$@
+	@echo #define NVSIZE ^12>> config.h
+	@echo #define LONG_DOUBLESIZE ^12>> config.h
 endif
-	@echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0>>$@
-	@echo #define NVef "Le">>$@
-	@echo #define NVff "Lf">>$@
-	@echo #define NVgf "Lg">>$@
-	@echo #define USE_LONG_DOUBLE>>$@
+	@echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0>> config.h
+	@echo #define NVef "Le">> config.h
+	@echo #define NVff "Lf">> config.h
+	@echo #define NVgf "Lg">> config.h
+	@echo #define USE_LONG_DOUBLE>> config.h
 else
-	@echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*g",(n),(x))>>$@
-	@echo #undef HAS_FREXPL>>$@
-	@echo #undef HAS_ISNANL>>$@
-	@echo #undef HAS_MODFL>>$@
-	@echo #undef HAS_MODFL_PROTO>>$@
-	@echo #undef HAS_SQRTL>>$@
-	@echo #undef HAS_STRTOLD>>$@
-	@echo #undef PERL_PRIfldbl>>$@
-	@echo #undef PERL_PRIgldbl>>$@
-	@echo #undef PERL_PRIeldbl>>$@
-	@echo #undef PERL_SCNfldbl>>$@
-	@echo #define NVTYPE double>>$@
-	@echo #define NVSIZE ^8>>$@
-	@echo #define LONG_DOUBLESIZE ^8>>$@
-	@echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0>>$@
-	@echo #define NVef "e">>$@
-	@echo #define NVff "f">>$@
-	@echo #define NVgf "g">>$@
-	@echo #undef USE_LONG_DOUBLE>>$@
+	@echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*g",(n),(x))>> config.h
+	@echo #undef HAS_FREXPL>> config.h
+	@echo #undef HAS_ISNANL>> config.h
+	@echo #undef HAS_MODFL>> config.h
+	@echo #undef HAS_MODFL_PROTO>> config.h
+	@echo #undef HAS_SQRTL>> config.h
+	@echo #undef HAS_STRTOLD>> config.h
+	@echo #undef PERL_PRIfldbl>> config.h
+	@echo #undef PERL_PRIgldbl>> config.h
+	@echo #undef PERL_PRIeldbl>> config.h
+	@echo #undef PERL_SCNfldbl>> config.h
+	@echo #define NVTYPE double>> config.h
+	@echo #define NVSIZE ^8>> config.h
+	@echo #define LONG_DOUBLESIZE ^8>> config.h
+	@echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0>> config.h
+	@echo #define NVef "e">> config.h
+	@echo #define NVff "f">> config.h
+	@echo #define NVgf "g">> config.h
+	@echo #undef USE_LONG_DOUBLE>> config.h
 endif
-	@echo #endif>>$@
-
-..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
-	cd .. && miniperl -Ilib make_patchnum.pl
-
-# make sure that we recompile perl.c if the git version changes
-..\perl$(o) : ..\git_version.h
-
-..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(MINIPERL)
-	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
-
-# This target is for when changes to the main config.sh happen.
-# Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
-# with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
-# this target to regenerate config_H.gc.
-regen_config_h:
-	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS)) $(CFGSH_TMPL) > ..\config.sh
-	$(MINIPERL) -I..\lib ..\configpm --chdir=..
-	-del /f $(CFGH_TMPL)
-	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
-	rename config.h $(CFGH_TMPL)
-
-$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
-	$(MINIPERL) -I..\lib ..\configpm --chdir=..
-	if exist lib\* $(RCOPY) "lib\*.*" ..\lib\$(NULL)
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(XCOPY) "*.h" $(COREDIR)\$(NULL)
-	$(RCOPY) include $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \
-	    || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
-
-# See the comment in Makefile.SH explaining this seemingly cranky ordering
-$(MINIPERL) : ..\lib\buildcustomize.pl
-
-..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl
-	$(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
-	$(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
-
-$(MINIDIR) :
-	if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
+	@echo #endif>> config.h
+#separate line since this is sentinal that this target is done
+	rem. > $(MINIDIR)\.exists
 
 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
-	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
+	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*F).c
 
 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
-	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c
+	$(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*F).c
 
 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
-# unless the .IF is true), so instead we use a else with the default.
+# unless the .IF is true), so instead we use a .ELSE with the default.
 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
 
-perllib$(o)	: perllib.c .\perlhost.h .\vdir.h .\vmem.h
+perllib$(o)	: perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h
 ifeq ($(USE_IMP_SYS),define)
-	$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
+	$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
 else
-	$(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
+	$(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
 endif
 
 # 1. we don't want to rebuild miniperl.exe when config.h changes
 # 2. we don't want to rebuild miniperl.exe with non-default config.h
 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
-$(MINI_OBJ)	: $(CORE_NOCFG_H)
+$(MINI_OBJ)	: $(MINIDIR)\.exists $(CORE_NOCFG_H)
 
 $(WIN32_OBJ)	: $(CORE_H)
 
@@ -984,22 +1013,22 @@ $(CORE_OBJ)	: $(CORE_H)
 
 $(DLL_OBJ)	: $(CORE_H)
 
-perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
+
+perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl
 	$(MINIPERL) -I..\lib create_perllibst_h.pl
+
+perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
 	$(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
 	$(BUILDOPT) CCTYPE=GCC TARG_DIR=..\ > perldll.def
 
-$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
-	$(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
-	   $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES)
-	$(IMPLIB) --output-lib $(PERLIMPLIB) \
-		--dllname $(PERLDLL) \
-		--def perldll.def \
-		--base-file perl.base \
-		--output-exp perl.exp
+$(PERLEXPLIB) : $(PERLIMPLIB)
+
+$(PERLIMPLIB) : perldll.def
+	$(IMPLIB) -k -d perldll.def -l $(PERLIMPLIB) -e $(PERLEXPLIB)
+
+$(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
 	$(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
-	    $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) perl.exp
-	$(XCOPY) $(PERLIMPLIB) $(COREDIR)
+	   $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) $(PERLEXPLIB)
 
 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
 	$(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
@@ -1020,24 +1049,26 @@ $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
 $(BITCOUNT_H) : $(GENUUDMAP)
 	$(GENUUDMAP) $(GENERATED_HEADERS)
 
-$(GENUUDMAP_OBJ) : ..\mg_raw.h
-
-$(GENUUDMAP) : $(GENUUDMAP_OBJ)
-	$(LINK32) -o $@ $(BLINK_FLAGS) $(GENUUDMAP_OBJ) $(LIBFILES)
+$(GENUUDMAP) : ..\mg_raw.h
+	$(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
+	$(BLINK_FLAGS) $(LIBFILES)
 
-perlmain.c : runperl.c
-	copy runperl.c perlmain.c
+#This generates a stub ppport.h & creates & fills /lib/CORE to allow for XS
+#building .c->.obj wise (linking is a different thing). This target is AKA
+#$(HAVE_COREDIR).
+$(COREDIR)\ppport.h : $(CORE_H)
+	$(XCOPY) *.h $(COREDIR)\\*.*
+	$(RCOPY) include $(COREDIR)\\*.*
+	$(XCOPY) ..\\*.h $(COREDIR)\\*.*
+	rem. > $@
 
-perlmain$(o) : perlmain.c
-	$(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ -c perlmain.c
+perlmain$(o) : runperl.c $(CONFIGPM)
+	$(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 
-perlmainst.c : runperl.c
-	copy runperl.c perlmainst.c
+perlmainst$(o) : runperl.c $(CONFIGPM)
+	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 
-perlmainst$(o) : perlmainst.c
-	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
-
-$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
+$(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
 	$(LINK32) -mconsole -o $@ $(BLINK_FLAGS)  \
 	    $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
 	copy $(PERLEXE) $(WPERLEXE)
@@ -1047,42 +1078,50 @@ $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
 	$(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
 	    $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
 
-MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
-	$(MINIPERL) -I..\lib ..\mkppport
-
 #-------------------------------------------------------------------------------
 # There's no direct way to mark a dependency on
 # DynaLoader.pm, so this will have to do
-Extensions : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
 
-Extensions_reonly : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
+#most of deps of this target are in DYNALOADER and therefore omitted here
+Extensions : $(PERLDEP) $(DYNALOADER) $(GLOBEXE)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
 
-Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
+Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize
+
+Extensions_reonly : $(PERLDEP) $(DYNALOADER)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
+
+Extensions_static : ..\make_ext.pl list_static_libs.pl $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
 	$(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 
-Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
+Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs
 
-$(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
-	$(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
-	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
+#lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building
+$(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR)
+	$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader lib
 
 Extensions_clean :
-	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
+	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
 
 Extensions_realclean :
-	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
+	-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
+
+# all PE files need to be built by the time this target runs, PP files can still
+# be running in parallel like UNIDATAFILES, this target a placeholder for the
+# future
+ifeq ($(BUILD_STATIC),define)
+rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(PERLEXESTATIC)
+else
+rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE)
+endif
+	$(NOOP)
 
 #-------------------------------------------------------------------------------
 
-doc: $(PERLEXE) ..\pod\perltoc.pod
+doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod
 	$(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
 	    --podpath=pod:lib:utils --htmlroot="file://$(subst :,|,$(INST_HTML))"\
 	    --recurse
@@ -1092,8 +1131,8 @@ doc: $(PERLEXE) ..\pod\perltoc.pod
 
 # Note that this next section is parsed (and regenerated) by pod/buildtoc
 # so please check that script before making structural changes here
-utils: $(PERLEXE) ..\utils\Makefile
-	cd ..\utils && $(MAKE) PERL=$(MINIPERL)
+utils: $(HAVEMINIPERL) ..\utils\Makefile
+	cd ..\utils && $(PLMAKE) PERL=$(MINIPERL)
 	copy ..\README.aix      ..\pod\perlaix.pod
 	copy ..\README.amiga    ..\pod\perlamiga.pod
 	copy ..\README.android  ..\pod\perlandroid.pod
@@ -1128,11 +1167,11 @@ utils: $(PERLEXE) ..\utils\Makefile
 	copy ..\README.vos      ..\pod\perlvos.pod
 	copy ..\README.win32    ..\pod\perlwin32.pod
 	copy ..\pod\perldelta.pod ..\pod\perl5235delta.pod
-	$(PERLEXE) $(PL2BAT) $(UTILS)
+	$(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
 	$(MINIPERL) -I..\lib ..\autodoc.pl ..
 	$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
 
-..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
+..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs Extensions_normalize utils
 	$(PERLEXE) -f ..\pod\buildtoc -q
 
 # Note that the pod cleanup in this next section is parsed (and regenerated
@@ -1233,7 +1272,7 @@ distclean: realclean
 	    perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
 	    perlwin32.pod
 	-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
-	    perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
+	    perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \
 	    xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
 	-del /f ..\config.sh perlmain.c dlutils.c config.h.new \
 	    perlmainst.c
@@ -1269,11 +1308,12 @@ installhtml : doc
 inst_lib : $(CONFIGPM)
 	$(RCOPY) ..\lib $(INST_LIB)\$(NULL)
 
-$(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
-	cd ..\lib\unicore && \
-	..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p
+$(UNIDATAFILES) : ..\pod\perluniprops.pod
+
+..\pod\perluniprops.pod: ..\lib\unicore\mktables $(CONFIGPM)
+	$(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
 
-minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
+minitest : $(HAVEMINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
 	$(XCOPY) $(MINIPERL) ..\t\$(NULL)
 	if exist ..\t\perl.exe del /f ..\t\perl.exe
 	rename ..\t\miniperl.exe perl.exe
@@ -1311,11 +1351,10 @@ test-reonly : reonly utils
 	$(XCOPY) $(PERLDLL) ..\t\$(NULL)
 	$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
 	cd ..\t && \
-	$(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
-	cd ..\win32
+	$(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA)
 
 regen :
-	cd .. && regen.pl && cd win32
+	cd .. && regen.pl
 
 test-notty : test-prep
 	set PERL_STATIC_EXT=$(STATIC_EXT) && \
@@ -1354,7 +1393,7 @@ _clean :
 	-@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
 	-@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
 	-@erase *.ilk
-	-@erase *.pdb
+	-@erase *.pdb ..\*.pdb
 	-@erase Extensions_static
 
 clean : Extensions_clean _clean
@@ -1365,14 +1404,15 @@ realclean : Extensions_realclean _clean
 # installed perlbug. We don't re-run the tests here - we trust the user.
 # Please *don't* use this unless all tests pass.
 # If you want to report test failures, use "gmake nok" instead.
-ok: utils
-	$(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
+ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
+	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
+
+okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
+	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
 
-okfile: utils
-	$(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
+nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
+	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
 
-nok: utils
-	$(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
+nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
+	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok
 
-nokfile: utils
-	$(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok
diff --git a/win32/config_h.PL b/win32/config_h.PL
index 1280655..89c7a20 100644
--- a/win32/config_h.PL
+++ b/win32/config_h.PL
@@ -84,10 +84,12 @@ while (<SH>)
 close(H);
 close(SH);
 
-if (compare("$file.new","$opt{CORE_DIR}/$opt{CONFIG_H}")) {
-    chmod(0666,"$opt{CORE_DIR}/$opt{CONFIG_H}");
-    copy("$file.new","$opt{CORE_DIR}/$opt{CONFIG_H}") || die "Cannot copy:$!";
-    chmod(0444,"$opt{CORE_DIR}/$opt{CONFIG_H}");
+my $core_config_h = "$opt{CORE_DIR}/$opt{CONFIG_H}";
+if (compare("$file.new", $core_config_h)) {
+    mkdir $opt{CORE_DIR} unless -d $opt{CORE_DIR};
+    chmod(0666,$core_config_h);
+    copy("$file.new",$core_config_h) || die "Cannot copy:$!";
+    chmod(0444,$core_config_h);
 }
 
 if (compare("$file.new",$file))
@@ -95,13 +97,11 @@ if (compare("$file.new",$file))
   warn "$file has changed\n";
   chmod(0666,$file);
   unlink($file);
-  rename("$file.new",$file);
-  exit(1);
+  rename("$file.new",$file) || die "Cannot rename:$!";
  }
 else
  {
   unlink ("$file.new");
-  exit(0);
  }
 
 sub Config
diff --git a/win32/makefile.mk b/win32/makefile.mk
index dece68a..56064c5 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -823,7 +823,7 @@ UTILS		=			\
 		..\utils\perlivp	\
 		..\utils\libnetcfg	\
 		..\utils\enc2xs		\
-		..\utils\encguess		\
+		..\utils\encguess	\
 		..\utils\piconv		\
 		..\utils\corelist	\
 		..\utils\cpan		\
@@ -847,7 +847,7 @@ UTILS		=			\
 
 CFGSH_TMPL	= config.gc
 CFGH_TMPL	= config_H.gc
-PERLIMPLIB	= ..\libperl523$(a)
+PERLIMPLIB	= $(COREDIR)\libperl523$(a)
 PERLSTATICLIB	= ..\libperl523s$(a)
 INT64		= long long
 
@@ -861,8 +861,8 @@ INT64		= __int64
 
 # makedef.pl must be updated if this changes, and this should normally
 # only change when there is an incompatible revision of the public API.
-PERLIMPLIB	*= ..\perl523$(a)
-PERLEXPLIB	*= ..\perl523.exp
+PERLIMPLIB	*= $(COREDIR)\perl523$(a)
+PERLEXPLIB	*= $(COREDIR)\perl523.exp
 PERLSTATICLIB	*= ..\perl523s$(a)
 PERLDLL		= ..\perl523.dll
 
@@ -990,7 +990,6 @@ GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
 #work, so this target also represents creating the COREDIR and filling it
 HAVE_COREDIR	= $(COREDIR)\ppport.h
 
-
 MICROCORE_OBJ	= $(MICROCORE_SRC:db:+$(o))
 CORE_OBJ	= $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
 WIN32_OBJ	= $(WIN32_SRC:db:+$(o))
@@ -1064,7 +1063,7 @@ CFG_VARS	=					\
 # Top targets
 #
 
-all : CHECKDMAKE  rebasePE Extensions_nonxs $(PERLSTATIC)
+all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC)
 
 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
 
@@ -1093,9 +1092,8 @@ $(GLOBEXE) : perlglob.c
 	$(LIBFILES) && $(EMBED_EXE_MANI)
 .ENDIF
 
-
 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
-	cd .. && miniperl -Ilib make_patchnum.pl
+	$(MINIPERL) -I..\lib ..\make_patchnum.pl
 
 # make sure that we recompile perl.c if the git version changes
 ..\perl$(o) : ..\git_version.h
@@ -1116,13 +1114,10 @@ regen_config_h:
 	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
 	rename config.h $(CFGH_TMPL)
 
-$(CONFIGPM): ..\config.sh config_h.PL
+$(CONFIGPM) .\config.h .UPDATEALL: ..\config.sh config_h.PL
 	$(MINIPERL) -I..\lib ..\configpm --chdir=..
-	$(XCOPY) config.h $(COREDIR)\*.*
 	-$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
 
-.\config.h : $(CONFIGPM)
-
 # See the comment in Makefile.SH explaining this seemingly cranky ordering
 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
 .IF "$(CCTYPE)" == "GCC"
@@ -1346,32 +1341,17 @@ perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
 	$(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
 	$(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
 
-$(PERLIMPLIB) : perldll.def
+$(PERLEXPLIB) $(PERLIMPLIB) .UPDATEALL : perldll.def
 .IF "$(CCTYPE)" == "GCC"
-	$(IMPLIB) -k -d perldll.def -l $(PERLIMPLIB)
+	$(IMPLIB) -k -d perldll.def -l $(PERLIMPLIB) -e $(PERLEXPLIB)
 .ELSE #VC family
 	lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB)
 .ENDIF
-	$(XCOPY) $(PERLIMPLIB) $(COREDIR)
-
-#PERLEXPLIB is built in PERLIMPLIB
-$(PERLEXPLIB): $(PERLIMPLIB)
 
 $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
 .IF "$(CCTYPE)" == "GCC"
-	$(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
-	    $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
-		$(shell @type Extensions_static) \
-		$(LIBFILES) $(LKPOST))
-	$(IMPLIB) --output-lib $(PERLIMPLIB) \
-		--dllname $(PERLDLL:b).dll \
-		--def perldll.def \
-		--base-file perl.base \
-		--output-exp perl.exp
 	$(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
-	    $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
-		$(shell @type Extensions_static) \
-		$(LIBFILES) perl.exp $(LKPOST))
+	   $(PERLDLL_OBJ) $(shell @type Extensions_static) $(LIBFILES) $(PERLEXPLIB)
 .ELSE
 	$(LINK32) -dll -out:$@ $(BLINK_FLAGS) \
 	    @Extensions_static \
@@ -1410,23 +1390,17 @@ $(GENUUDMAP) $(GENERATED_HEADERS) .UPDATEALL : ..\mg_raw.h
 	$(GENUUDMAP) $(GENERATED_HEADERS)
 
 #This generates a stub ppport.h & creates & fills /lib/CORE to allow for XS
-#building .c->.obj wise (linking is a different thing). This taget is AKA
+#building .c->.obj wise (linking is a different thing). This target is AKA
 #$(HAVE_COREDIR).
 $(COREDIR)\ppport.h : $(CORE_H)
 	$(XCOPY) *.h $(COREDIR)\*.* && $(RCOPY) include $(COREDIR)\*.* && $(XCOPY) ..\*.h $(COREDIR)\*.*
 	rem. > $@
 
-perlmain.c : runperl.c
-	copy runperl.c perlmain.c
-
-perlmain$(o) : $(CONFIGPM) perlmain.c
-	$(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ $(PDBOUT) -c perlmain.c
+perlmain$(o) : runperl.c $(CONFIGPM)
+	$(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 
-perlmainst.c : runperl.c
-	copy runperl.c perlmainst.c
-
-perlmainst$(o) : $(CONFIGPM) perlmainst.c
-	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c perlmainst.c
+perlmainst$(o) : runperl.c $(CONFIGPM)
+	$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
 
 $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
 .IF "$(CCTYPE)" == "GCC"
@@ -1485,9 +1459,9 @@ Extensions_realclean :
 # be running in parallel like UNIDATAFILES, this target a placeholder for the
 # future
 .IF "$(BUILD_STATIC)"=="define"
-rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(GLOBEXE) $(PERLEXESTATIC)
+rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(PERLEXESTATIC)
 .ELSE
-rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(GLOBEXE)
+rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE)
 .ENDIF
 	$(NOOP)
 
@@ -1544,7 +1518,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
 	$(MINIPERL) -I..\lib ..\autodoc.pl ..
 	$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
 
-..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs ..\pod\perluniprops.pod utils
+..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs Extensions_normalize utils
 	$(PERLEXE) -f ..\pod\buildtoc -q
 
 # Note that the pod cleanup in this next section is parsed (and regenerated
@@ -1683,9 +1657,8 @@ installhtml : doc
 inst_lib : $(CONFIGPM)
 	$(RCOPY) ..\lib $(INST_LIB)\*.*
 
-$(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(CONFIGPM) ..\lib\unicore\mktables
-	cd ..\lib\unicore && \
-	..\$(MINIPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p
+$(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : ..\lib\unicore\mktables $(CONFIGPM)
+	$(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
 
 minitest : .\config.h $(HAVEMINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) $(TESTPREPGCC)
 	$(XCOPY) $(MINIPERL) ..\t\$(NULL)
@@ -1774,8 +1747,6 @@ _clean :
 	-@erase *.pdb ..\*.pdb
 	-@erase Extensions_static
 
-
-
 clean : Extensions_clean _clean
 
 realclean : Extensions_realclean _clean
@@ -1784,14 +1755,15 @@ realclean : Extensions_realclean _clean
 # installed perlbug. We don't re-run the tests here - we trust the user.
 # Please *don't* use this unless all tests pass.
 # If you want to report test failures, use "dmake nok" instead.
-ok: utils
+ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
 
-okfile: utils
+okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 	$(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
 
-nok: utils
+nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
 
-nokfile: utils
+nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
 	$(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok
+
-- 
1.8.0.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Dec 9, 2015

From @bulk88

On Thu Nov 19 19​:17​:32 2015, bulk88 wrote​:

On Sat Nov 14 12​:18​:17 2015, bulk88 wrote​:

On Fri Nov 13 11​:27​:10 2015, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.40 running under perl 5.23.5.

-----------------------------------------------------------------
[Please describe your issue here]

See attached patches.

The parallelness to gnumakefile patch is failing tests, do not apply.
I will have to revise it.

The fixes were related to the changes to libperl***.a/perl****.lib and
their relationship to the CORE dir and a parallel build race condition
related to libperl***.a's lifecycle.

Bump.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Dec 23, 2015

From @bulk88

On Wed Dec 09 12​:10​:43 2015, bulk88 wrote​:

On Thu Nov 19 19​:17​:32 2015, bulk88 wrote​:

On Sat Nov 14 12​:18​:17 2015, bulk88 wrote​:

On Fri Nov 13 11​:27​:10 2015, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.40 running under perl 5.23.5.

-----------------------------------------------------------------
[Please describe your issue here]

See attached patches.

The parallelness to gnumakefile patch is failing tests, do not apply.
I will have to revise it.

The fixes were related to the changes to libperl***.a/perl****.lib and
their relationship to the CORE dir and a parallel build race condition
related to libperl***.a's lifecycle.

Bump.

You mentioned on IRC that these patches break the build and you pasted this failure.


run/locale.t ...................................................... 1/37 # Faile
d test 3 - no locales where LC_NUMERIC breaks at ./test.pl line 1027
# got "Can\'t load \'../lib/auto/POSIX/POSIX.dll\' for module POSIX​: load_f
ile​:%1 is not a valid Win32 application at ../lib/XSLoader.pm line 71.\n\000 at
../lib/POSIX.pm line 36.\nCompilation failed in require at - line 2.\nBEGIN fail
ed--compilation aborted at - line 2."
# expected ""
# PROG​:
# for (qw(Afrikaans Albanian American Arabic Basque Breton Bulgarian C Chinese C
roatian Czech Danish Dutch English Estonian Finnish Galician German Greek Greenl
andic Hebrew Hungarian Indonesian Italian Japanese Korean Latvian Lithuanian Nor
wegian Occitan Polish Russian Slovak Slovenian Swedish Thai Turkish Welsh ja)) {

# use POSIX qw(locale_h);
# use locale;
# setlocale(LC_NUMERIC, "$_") or next;
# my $s = sprintf "%g %g", 3.1, 3.1;
# next if $s eq '3.1 3.1' || $s =~ /^(3.+1) \1$/;
# print "$_ $s\n";
# }
# STATUS​: 65280


I can't reproduce it with GCC 4.8.3, 4.8.3 passes harness enough


Test Summary Report


op/taint.t (Wstat​: 0 Tests​:
807 Failed​: 2)
  Failed tests​: 1, 393
../cpan/ExtUtils-MakeMaker/t/echo.t (Wstat​: 512 Test
s​: 18 Failed​: 2)
  Failed tests​: 9, 12
  Non-zero exit status​: 2
Files=2409, Tests=738461, 2466 wallclock secs (96.67 usr + 24.50 sys = 121.17 CP
U)
Result​: FAIL
GNUmakefile​:1342​: recipe for target 'test' failed
gmake​: *** [test] Error 4

C​:\p523\src\win32>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=C​:/sp3220/c/bin/../libexec/gcc/i686-w64-mingw32/4.8.3/lto-wr
apper.exe
Target​: i686-w64-mingw32
Configured with​: ../../../src/gcc-4.8.3/configure --host=i686-w64-mingw32 --buil
d=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-gxx-includ
e-dir=/mingw32/i686-w64-mingw32/include/c++ --enable-shared --enable-static --di
sable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes
--enable-threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-
checking=release --enable-fully-dynamic-string --enable-version-specific-runtime
-libs --enable-sjlj-exceptions --disable-isl-version-check --disable-cloog-versi
on-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-bootstrap -
-disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable
-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with
-libiconv --with-system-zlib --with-gmp=/opt/build/prerequisites/i686-w64-mingw3
2-static --with-mpfr=/opt/build/prerequisites/i686-w64-mingw32-static --with-mpc
=/opt/build/prerequisites/i686-w64-mingw32-static --with-isl=/opt/build/prerequi
sites/i686-w64-mingw32-static --with-cloog=/opt/build/prerequisites/i686-w64-min
gw32-static --enable-cloog-backend=isl --with-pkgversion='i686-posix-sjlj, built
by strawberryperl.com project' CFLAGS='-O2 -pipe -I/opt/build/i686-483-posix-sj
lj-rt_v3/mingw32/opt/include -I/opt/build/prerequisites/i686-zlib-static/include
-I/opt/build/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe
-I/opt/build/i686-483-posix-sjlj-rt_v3/mingw32/opt/include -I/opt/build/prerequ
isites/i686-zlib-static/include -I/opt/build/prerequisites/i686-w64-mingw32-stat
ic/include' CPPFLAGS= LDFLAGS='-pipe -L/opt/build/i686-483-posix-sjlj-rt_v3/ming
w32/opt/lib -L/opt/build/prerequisites/i686-zlib-static/lib -L/opt/build/prerequ
isites/i686-w64-mingw32-static/lib'
Thread model​: posix
gcc version 4.8.3 (i686-posix-sjlj, built by strawberryperl.com project)
C​:\p523\src\win32>


Mingw 3.4.5 C syntax errors but I dont think that it is the patches in this ticket that caused it (CC bug since newer GCCs dont report this?)


Running Mkbootstrap for PerlIO​::encoding ()
C​:\p523\src\miniperl.exe "-I..\..\lib" "-I..\..\lib" -MExtUtils​::Command -e chmo
d -- 644 "encoding.bs"
"..\..\miniperl.exe" "-I..\..\lib" "-I..\..\lib" "..\..\lib\ExtUtils/xsubpp" -t
ypemap "..\..\lib\ExtUtils\typemap" encoding.xs > encoding.xsc && C​:\p523\src\m
iniperl.exe "-I..\..\lib" "-I..\..\lib" -MExtUtils​::Command -e mv -- encoding.xs
c encoding.c
gcc -c -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_I
MPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO -fno-strict-aliasing -mms-bitfields
-s -O2 -DVERSION=\"0.23\" -DXS_VERSION=\"0.23\" "-I..\..\lib\CORE" encodin
g.c
encoding.xs​:633​: error​: initializer element is not constant
encoding.xs​:633​: error​: (near initialization for `PerlIO_encode.Open')
encoding.xs​:636​: error​: initializer element is not constant
encoding.xs​:636​: error​: (near initialization for `PerlIO_encode.Fileno')
encoding.xs​:638​: error​: initializer element is not constant
encoding.xs​:638​: error​: (near initialization for `PerlIO_encode.Read')
encoding.xs​:639​: error​: initializer element is not constant
encoding.xs​:639​: error​: (near initialization for `PerlIO_encode.Unread')
encoding.xs​:641​: error​: initializer element is not constant
encoding.xs​:641​: error​: (near initialization for `PerlIO_encode.Seek')
encoding.xs​:646​: error​: initializer element is not constant
encoding.xs​:646​: error​: (near initialization for `PerlIO_encode.Eof')
encoding.xs​:647​: error​: initializer element is not constant
encoding.xs​:647​: error​: (near initialization for `PerlIO_encode.Error')
encoding.xs​:648​: error​: initializer element is not constant
encoding.xs​:648​: error​: (near initialization for `PerlIO_encode.Clearerr')
encoding.xs​:649​: error​: initializer element is not constant
encoding.xs​:649​: error​: (near initialization for `PerlIO_encode.Setlinebuf')
encoding.xs​:651​: error​: initializer element is not constant
encoding.xs​:651​: error​: (near initialization for `PerlIO_encode.Get_bufsiz')
encoding.xs​:652​: error​: initializer element is not constant
encoding.xs​:652​: error​: (near initialization for `PerlIO_encode.Get_ptr')
encoding.xs​:653​: error​: initializer element is not constant
encoding.xs​:653​: error​: (near initialization for `PerlIO_encode.Get_cnt')
encoding.xs​:654​: error​: initializer element is not constant
encoding.xs​:654​: error​: (near initialization for `PerlIO_encode.Set_ptrcnt')
C​:\p523\src\win32>gcc -v
Reading specs from C​:/Perl3216/site/lib/auto/MinGW/bin/../lib/gcc/mingw32/3.4.5/
specs
Configured with​: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld --wi
th-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --dis
able-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --d
isable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --with
out-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enabl
e-hash-synchronization --enable-libstdcxx-debug
Thread model​: win32
gcc version 3.4.5 (mingw-vista special r3)


--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Dec 26, 2015

From @bulk88

On Wed Dec 23 02​:41​:12 2015, bulk88 wrote​:

On Wed Dec 09 12​:10​:43 2015, bulk88 wrote​:

Bump.

You mentioned on IRC that these patches break the build and you pasted
this failure.

Forgot to add, rebased on blead patch set posted at http​://perl5.git.perl.org/perl.git/shortlog/refs/heads/smoke-me/bulk88/gnumkfpara

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Dec 27, 2015

From @bulk88

On Wed Dec 23 02​:41​:12 2015, bulk88 wrote​:

On Wed Dec 09 12​:10​:43 2015, bulk88 wrote​:

On Thu Nov 19 19​:17​:32 2015, bulk88 wrote​:

On Sat Nov 14 12​:18​:17 2015, bulk88 wrote​:

On Fri Nov 13 11​:27​:10 2015, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.40 running under perl
5.23.5.

-----------------------------------------------------------------
[Please describe your issue here]

See attached patches.

The parallelness to gnumakefile patch is failing tests, do not
apply.
I will have to revise it.

The fixes were related to the changes to libperl***.a/perl****.lib
and
their relationship to the CORE dir and a parallel build race
condition
related to libperl***.a's lifecycle.

Bump.

You mentioned on IRC that these patches break the build and you pasted
this failure.
------------------------------------------
run/locale.t ......................................................
1/37 # Faile
d test 3 - no locales where LC_NUMERIC breaks at ./test.pl line 1027
# got "Can\'t load \'../lib/auto/POSIX/POSIX.dll\' for module
POSIX​: load_f
ile​:%1 is not a valid Win32 application at ../lib/XSLoader.pm line
71.\n\000 at
../lib/POSIX.pm line 36.\nCompilation failed in require at - line
2.\nBEGIN fail
ed--compilation aborted at - line 2."
# expected ""
# PROG​:
# for (qw(Afrikaans Albanian American Arabic Basque Breton Bulgarian C
Chinese C
roatian Czech Danish Dutch English Estonian Finnish Galician German
Greek Greenl
andic Hebrew Hungarian Indonesian Italian Japanese Korean Latvian
Lithuanian Nor
wegian Occitan Polish Russian Slovak Slovenian Swedish Thai Turkish
Welsh ja)) {

# use POSIX qw(locale_h);
# use locale;
# setlocale(LC_NUMERIC, "$_") or next;
# my $s = sprintf "%g %g", 3.1, 3.1;
# next if $s eq '3.1 3.1' || $s =~ /^(3.+1) \1$/;
# print "$_ $s\n";
# }
# STATUS​: 65280
-----------------------------------------

I can't reproduce it with GCC 4.8.3, 4.8.3 passes harness enough

I think I figured it out. gmake passes the -j flag through env vars to "sub makes". The EUMM per module child makes were running in parallel mode randomly if a build slot was available in the pool (unlike dmake, gmake processes all talk to each other through IPC, so -j4 can be 2 processes in parent gmake proc, and 1 per 2 child procs) and parallel EUMM on Win32 has never been tested/supported/kinks so the child EUMM make runs should be serial, not parallel . I've started work on MSVC for gnumakefile, and disabled parallelism for make_ext.pl launched makefiles in the MSVC patch.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2016

From @bulk88

On Sat Dec 26 17​:03​:49 2015, bulk88 wrote​:

On Wed Dec 23 02​:41​:12 2015, bulk88 wrote​:

On Wed Dec 09 12​:10​:43 2015, bulk88 wrote​:

On Thu Nov 19 19​:17​:32 2015, bulk88 wrote​:

On Sat Nov 14 12​:18​:17 2015, bulk88 wrote​:

On Fri Nov 13 11​:27​:10 2015, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.40 running under perl
5.23.5.

-----------------------------------------------------------------
[Please describe your issue here]

See attached patches.

The parallelness to gnumakefile patch is failing tests, do not
apply.
I will have to revise it.

The fixes were related to the changes to
libperl***.a/perl****.lib
and
their relationship to the CORE dir and a parallel build race
condition
related to libperl***.a's lifecycle.

Bump.

You mentioned on IRC that these patches break the build and you
pasted
this failure.
------------------------------------------
run/locale.t ......................................................
1/37 # Faile
d test 3 - no locales where LC_NUMERIC breaks at ./test.pl line 1027
# got "Can\'t load \'../lib/auto/POSIX/POSIX.dll\' for module
POSIX​: load_f
ile​:%1 is not a valid Win32 application at ../lib/XSLoader.pm line
71.\n\000 at
../lib/POSIX.pm line 36.\nCompilation failed in require at - line
2.\nBEGIN fail
ed--compilation aborted at - line 2."
# expected ""
# PROG​:
# for (qw(Afrikaans Albanian American Arabic Basque Breton Bulgarian
C
Chinese C
roatian Czech Danish Dutch English Estonian Finnish Galician German
Greek Greenl
andic Hebrew Hungarian Indonesian Italian Japanese Korean Latvian
Lithuanian Nor
wegian Occitan Polish Russian Slovak Slovenian Swedish Thai Turkish
Welsh ja)) {

# use POSIX qw(locale_h);
# use locale;
# setlocale(LC_NUMERIC, "$_") or next;
# my $s = sprintf "%g %g", 3.1, 3.1;
# next if $s eq '3.1 3.1' || $s =~ /^(3.+1) \1$/;
# print "$_ $s\n";
# }
# STATUS​: 65280
-----------------------------------------

I can't reproduce it with GCC 4.8.3, 4.8.3 passes harness enough

I think I figured it out. gmake passes the -j flag through env vars to
"sub makes". The EUMM per module child makes were running in parallel
mode randomly if a build slot was available in the pool (unlike dmake,
gmake processes all talk to each other through IPC, so -j4 can be 2
processes in parent gmake proc, and 1 per 2 child procs) and parallel
EUMM on Win32 has never been tested/supported/kinks so the child EUMM
make runs should be serial, not parallel . I've started work on MSVC
for gnumakefile, and disabled parallelism for make_ext.pl launched
makefiles in the MSVC patch.

bump

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2016

From @bulk88

details for "win32/GNUmakefile collapse shell echos into one liners"

All these benchmarks numbers were done on battery so they are unusually large for modern PCs.

BEFORE

C​:\p523\src\win32>timeit -f t.dat gmake mini\.exists CCTYPE=MSVC120
if not exist "mini" mkdir "mini"
del /f config.h
Could Not Find C​:\p523\src\win32\config.h
copy config_H.vc config.h
  1 file(s) copied.
rem. > mini\.exists

Version Number​: Windows NT 6.1 (Build 7601)
Exit Time​: 1​:16 pm, Monday, January 4 2016
Elapsed Time​: 0​:00​:02.265
Process Time​: 0​:00​:01.092
System Calls​: 164148
Context Switches​: 57010
Page Faults​: 66654
Bytes Read​: 1286171
Bytes Written​: 157499
Bytes Other​: 3320129

C​:\p523\src\win32>plclean

C​:\p523\src\win32>cd .. & git clean -dfX & cd win32
Removing win32/config.h
Removing win32/mini/

C​:\p523\src\win32>timeit -f t.dat gmake mini\.exists CCTYPE=MSVC120
if not exist "mini" mkdir "mini"
del /f config.h
Could Not Find C​:\p523\src\win32\config.h
copy config_H.vc config.h
  1 file(s) copied.
rem. > mini\.exists

Version Number​: Windows NT 6.1 (Build 7601)
Exit Time​: 1​:16 pm, Monday, January 4 2016
Elapsed Time​: 0​:00​:02.279
Process Time​: 0​:00​:00.998
System Calls​: 166397
Context Switches​: 60285
Page Faults​: 66545
Bytes Read​: 1271839
Bytes Written​: 157543
Bytes Other​: 3318049

C​:\p523\src\win32>plclean

C​:\p523\src\win32>cd .. & git clean -dfX & cd win32
Removing win32/config.h
Removing win32/mini/

C​:\p523\src\win32>timeit -f t.dat gmake mini\.exists CCTYPE=MSVC120
if not exist "mini" mkdir "mini"
del /f config.h
Could Not Find C​:\p523\src\win32\config.h
copy config_H.vc config.h
  1 file(s) copied.
rem. > mini\.exists

Version Number​: Windows NT 6.1 (Build 7601)
Exit Time​: 1​:16 pm, Monday, January 4 2016
Elapsed Time​: 0​:00​:02.302
Process Time​: 0​:00​:01.076
System Calls​: 164930
Context Switches​: 63418
Page Faults​: 66371
Bytes Read​: 1271795
Bytes Written​: 157499
Bytes Other​: 3310300

C​:\p523\src\win32>

AFTER

C​:\p523\src\win32>timeit -f t.dat gmake mini\.exists CCTYPE=MSVC120
if not exist "mini" mkdir "mini"
del /f config.h
Could Not Find C​:\p523\src\win32\config.h
copy config_H.vc config.h
  1 file(s) copied.
rem. > mini\.exists

Version Number​: Windows NT 6.1 (Build 7601)
Exit Time​: 1​:15 pm, Monday, January 4 2016
Elapsed Time​: 0​:00​:00.400
Process Time​: 0​:00​:00.156
System Calls​: 24859
Context Switches​: 7485
Page Faults​: 13735
Bytes Read​: 456196
Bytes Written​: 181265
Bytes Other​: 506120

C​:\p523\src\win32>plclean

C​:\p523\src\win32>cd .. & git clean -dfX & cd win32
Removing win32/config.h
Removing win32/mini/

C​:\p523\src\win32>timeit -f t.dat gmake mini\.exists CCTYPE=MSVC120
if not exist "mini" mkdir "mini"
del /f config.h
Could Not Find C​:\p523\src\win32\config.h
copy config_H.vc config.h
  1 file(s) copied.
rem. > mini\.exists

Version Number​: Windows NT 6.1 (Build 7601)
Exit Time​: 1​:15 pm, Monday, January 4 2016
Elapsed Time​: 0​:00​:00.450
Process Time​: 0​:00​:00.187
System Calls​: 32688
Context Switches​: 8958
Page Faults​: 16166
Bytes Read​: 1608059
Bytes Written​: 155843
Bytes Other​: 506512

C​:\p523\src\win32>plclean

C​:\p523\src\win32>cd .. & git clean -dfX & cd win32
Removing win32/config.h
Removing win32/mini/

C​:\p523\src\win32>timeit -f t.dat gmake mini\.exists CCTYPE=MSVC120
if not exist "mini" mkdir "mini"
del /f config.h
Could Not Find C​:\p523\src\win32\config.h
copy config_H.vc config.h
  1 file(s) copied.
rem. > mini\.exists

Version Number​: Windows NT 6.1 (Build 7601)
Exit Time​: 1​:15 pm, Monday, January 4 2016
Elapsed Time​: 0​:00​:00.404
Process Time​: 0​:00​:00.171
System Calls​: 30185
Context Switches​: 8482
Page Faults​: 13772
Bytes Read​: 440336
Bytes Written​: 155843
Bytes Other​: 508276

C​:\p523\src\win32>

From 2.3 wall seconds to 0.4 wall seconds, 575% improvement, not bad. Writing mini config.h is a critical task for parallelism, since *NONE* of the miniperl CC .c->o processes (2-16 or 2-∞ processes in parallel) can be launched until mini config.h target is finished.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2016

From @tonycoz

On Sat Dec 26 17​:03​:49 2015, bulk88 wrote​:

I think I figured it out. gmake passes the -j flag through env vars to
"sub makes". The EUMM per module child makes were running in parallel
mode randomly if a build slot was available in the pool (unlike dmake,
gmake processes all talk to each other through IPC, so -j4 can be 2
processes in parent gmake proc, and 1 per 2 child procs) and parallel
EUMM on Win32 has never been tested/supported/kinks so the child EUMM
make runs should be serial, not parallel . I've started work on MSVC
for gnumakefile, and disabled parallelism for make_ext.pl launched
makefiles in the MSVC patch.

I'm not seeing the corrupt POSIX.dll on gcc builds with your smoke-me branch.

This block from GNUmakefile is talking about dmake​:

#EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel
#$(MAKE) will contain the -P that this makefile was called with, which is bad for
#make_ext.pl since upto jobs*jobs processes will run instead of jobs
#also any recipie containing $(MAKE) is special cased by dmake to execute recipes
#containing $(MAKE) when "dmake -n" is executed, which causes recursive calls
#to dmake, which means "dmake -n" is then broken as a diagnostic tool since
#"dmake -n" will invoke all the make_ext.pl scripts build things instead of
#showing what to build since $(MAKE) is an arg to make_ext.pl, not an invocation
#of the dmake process
PLMAKE = gmake

with a fair bit of discussion about dmake that doesn't apply to gmake.

It looks like you did a search and replace on the version number in dist/ExtUtils-CBuilder/ which has incorrectly replaced the version in the header of the Changes file. I don't see any description of the change made to EU​::CB in your commit comments.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jan 5, 2016

From @bulk88

On Mon Jan 04 15​:21​:23 2016, tonyc wrote​:

This block from GNUmakefile is talking about dmake​:

fixed in repushed smoke-me/bulk88/gnumkfpara branch.

It looks like you did a search and replace on the version number in
dist/ExtUtils-CBuilder/ which has incorrectly replaced the version in
the header of the Changes file. I don't see any description of the
change made to EU​::CB in your commit comments.

I added comments to commit. The Changes change was actually a typo fix by me, not a description of a new release. I added a line about the libperl when building core location change change to Changes, but it is completely meaningless for a CPAN release of CBuilder.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jan 20, 2016

From @bulk88

On Tue Jan 05 03​:10​:10 2016, bulk88 wrote​:

On Mon Jan 04 15​:21​:23 2016, tonyc wrote​:

This block from GNUmakefile is talking about dmake​:

fixed in repushed smoke-me/bulk88/gnumkfpara branch.

It looks like you did a search and replace on the version number in
dist/ExtUtils-CBuilder/ which has incorrectly replaced the version in
the header of the Changes file. I don't see any description of the
change made to EU​::CB in your commit comments.

I added comments to commit. The Changes change was actually a typo fix
by me, not a description of a new release. I added a line about the
libperl when building core location change change to Changes, but it
is completely meaningless for a CPAN release of CBuilder.

i discovered a bug in branch smoke-me/bulk88/gnumkfpara and the branch is being revised locally, do not merge

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jan 20, 2016

From @bulk88

On Tue Jan 19 19​:47​:10 2016, bulk88 wrote​:

i discovered a bug in branch smoke-me/bulk88/gnumkfpara and the branch
is being revised locally, do not merge

Updated branch smoke-me/bulk88/gnumkfpara pushed. CFG_VARS and "s was the bug. I also added the unused comctl32 manifest in all XS DLLs commit since it touches all 3 makefiles and can't be applied to blead since GNUMakefile in blead has no MSVC support.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jan 25, 2016

From @tonycoz

On Wed Jan 20 09​:19​:39 2016, bulk88 wrote​:

On Tue Jan 19 19​:47​:10 2016, bulk88 wrote​:

i discovered a bug in branch smoke-me/bulk88/gnumkfpara and the
branch
is being revised locally, do not merge

Updated branch smoke-me/bulk88/gnumkfpara pushed. CFG_VARS and "s was
the bug. I also added the unused comctl32 manifest in all XS DLLs
commit since it touches all 3 makefiles and can't be applied to blead
since GNUMakefile in blead has no MSVC support.

Thanks, applied as 273df2b through 273df2b and added 273df2b since we've had a release.

Thanks for your work on this.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jan 25, 2016

@tonycoz - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented Jan 25, 2016

From @tonycoz

On Wed Jan 20 09​:19​:39 2016, bulk88 wrote​:

On Tue Jan 19 19​:47​:10 2016, bulk88 wrote​:

i discovered a bug in branch smoke-me/bulk88/gnumkfpara and the
branch
is being revised locally, do not merge

Updated branch smoke-me/bulk88/gnumkfpara pushed. CFG_VARS and "s was
the bug. I also added the unused comctl32 manifest in all XS DLLs
commit since it touches all 3 makefiles and can't be applied to blead
since GNUMakefile in blead has no MSVC support.

The new test for this is failing on Jenkins, but isn't failing for me on the test box we have access to via dromedary.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jan 25, 2016

From @bulk88

On Sun Jan 24 19​:16​:42 2016, tonyc wrote​:

The new test for this is failing on Jenkins, but isn't failing for me
on the test box we have access to via dromedary.

Tony

As discussed on IRC you can push a change to blead that changes the ok() to a cmp_ok() in http​://perl5.git.perl.org/perl.git/blobdiff/6f9606402d094dd61cc66ca20e1768729a7dd4cb..67c6176​:/ext/XS-APItest/t/win32.t

You can also do a "diag(Data​::Dumper​::Dumper([Comctl32Version()]))" and push that or something similar since Comctl32Version() returns all 4 version parts that make up a DLL's version resource version file.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Feb 8, 2016

From @tonycoz

On Sun Jan 24 19​:16​:42 2016, tonyc wrote​:

On Wed Jan 20 09​:19​:39 2016, bulk88 wrote​:

On Tue Jan 19 19​:47​:10 2016, bulk88 wrote​:

i discovered a bug in branch smoke-me/bulk88/gnumkfpara and the
branch
is being revised locally, do not merge

Updated branch smoke-me/bulk88/gnumkfpara pushed. CFG_VARS and "s was
the bug. I also added the unused comctl32 manifest in all XS DLLs
commit since it touches all 3 makefiles and can't be applied to blead
since GNUMakefile in blead has no MSVC support.

The new test for this is failing on Jenkins, but isn't failing for me
on the test box we have access to via dromedary.

For anyone following along this was caused by a problem in the batch file used for the build test in Jenkins.

Tony

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

From @khwilliamson

Thank you for submitting this report. You have helped make Perl better.
 
With the release of Perl 5.24.0 on May 9, 2016, this and 149 other issues have been resolved.

Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant