This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #43265] cygwin/Makefile.SHs: miniperl -Ilib for a clean @INC
[perl5.git] / makedef.pl
index 12a17b3..f0e359d 100644 (file)
@@ -6,8 +6,10 @@
 # and by AIX for creating libperl.a when -Dusershrplib is in effect,
 # and by MacOS Classic.
 #
-# reads global.sym, pp.sym, perlvars.h, intrpvar.h, thrdvar.h, config.h
+# reads global.sym, pp.sym, perlvars.h, intrpvar.h, config.h
 # On OS/2 reads miniperl.map and the previous version of perl5.def as well
+
+BEGIN { unshift @INC, "lib" }
 use strict;
 
 use vars qw($PLATFORM $CCTYPE $FILETYPE $CONFIG_ARGS $ARCHNAME $PATCHLEVEL);
@@ -70,7 +72,6 @@ my $exportperlmalloc = $PLATFORM eq 'os2';
 
 my $config_sh   = "config.sh";
 my $config_h    = "config.h";
-my $thrdvar_h   = "thrdvar.h";
 my $intrpvar_h  = "intrpvar.h";
 my $perlvars_h  = "perlvars.h";
 my $global_sym  = "global.sym";
@@ -84,13 +85,13 @@ if ($PLATFORM eq 'aix') {
 }
 elsif ($PLATFORM =~ /^win(?:32|ce)$/ || $PLATFORM eq 'netware') {
     $CCTYPE = "MSVC" unless defined $CCTYPE;
-    foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
+    foreach ($intrpvar_h, $perlvars_h, $global_sym,
             $pp_sym, $globvar_sym, $perlio_sym) {
        s!^!..\\!;
     }
 }
 elsif ($PLATFORM eq 'MacOS') {
-    foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
+    foreach ($intrpvar_h, $perlvars_h, $global_sym,
             $pp_sym, $globvar_sym, $perlio_sym) {
        s!^!::!;
     }
@@ -160,7 +161,11 @@ print STDERR "Defines: (" . join(' ', sort keys %define) . ")\n";
 if ($PLATFORM =~ /^win(?:32|ce)$/) {
     (my $dll = ($define{PERL_DLL} || "perl59")) =~ s/\.dll$//i;
     print "LIBRARY $dll\n";
-    print "DESCRIPTION 'Perl interpreter'\n";
+    # The DESCRIPTION module definition file statement is not supported
+    # by VC7 onwards.
+    if ($CCTYPE !~ /^MSVC7/ && $CCTYPE !~ /^MSVC8/) {
+       print "DESCRIPTION 'Perl interpreter'\n";
+    }
     print "EXPORTS\n";
     if ($define{PERL_IMPLICIT_SYS}) {
        output_symbol("perl_get_host_info");
@@ -627,7 +632,6 @@ else {
 unless ($define{'PERL_OLD_COPY_ON_WRITE'}) {
     skip_symbols [qw(
                    Perl_sv_setsv_cow
-                   Perl_sv_release_IVX
                  )];
 }
 
@@ -729,6 +733,7 @@ unless ($define{'USE_ITHREADS'}) {
                    Perl_gp_dup
                    Perl_he_dup
                    Perl_mg_dup
+                   Perl_mro_meta_dup
                    Perl_re_dup
                    Perl_sv_dup
                    Perl_rvpv_dup
@@ -745,6 +750,7 @@ unless ($define{'USE_ITHREADS'}) {
                    Perl_sharedsv_unlock
                    Perl_stashpv_hvname_match
                    Perl_regdupe_internal
+                   Perl_newPADOP
                    )];
 }
 
@@ -794,6 +800,13 @@ unless ($define{'PL_OP_SLAB_ALLOC'}) {
                     )];
 }
 
+unless ($define{'PERL_DEBUG_READONLY_OPS'}) {
+    skip_symbols [qw(
+                   PL_slab_count
+                   PL_slabs
+                  )];
+}
+
 unless ($define{'THREADS_HAVE_PIDS'}) {
     skip_symbols [qw(PL_ppid)];
 }
@@ -1148,7 +1161,7 @@ for my $syms (@syms) {
 # variables
 
 if ($define{'MULTIPLICITY'}) {
-    for my $f ($perlvars_h, $intrpvar_h, $thrdvar_h) {
+    for my $f ($perlvars_h, $intrpvar_h) {
        my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
        emit_symbols $glob;
     }
@@ -1167,10 +1180,6 @@ else {
        my $glob = readvar($intrpvar_h);
        emit_symbols $glob;
     }
-    unless ($define{'MULTIPLICITY'}) {
-       my $glob = readvar($thrdvar_h);
-       emit_symbols $glob;
-    }
 }
 
 sub try_symbol {