summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib/ExtUtils
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1999-05-02 14:33:17 +0000
committermarkm <markm@FreeBSD.org>1999-05-02 14:33:17 +0000
commit97aab710a2f6203613df23d6d3073caf7a107caf (patch)
tree4dc131658eab017254bbce9b8f810fe22254c330 /contrib/perl5/lib/ExtUtils
parent1285616a27e509d2b86ef49474a3babbf9b58dbe (diff)
parent77644ee620b6a79cf8c538abaf7cd301a875528d (diff)
downloadFreeBSD-src-97aab710a2f6203613df23d6d3073caf7a107caf.zip
FreeBSD-src-97aab710a2f6203613df23d6d3073caf7a107caf.tar.gz
This commit was generated by cvs2svn to compensate for changes in r46307,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/perl5/lib/ExtUtils')
-rw-r--r--contrib/perl5/lib/ExtUtils/Command.pm4
-rw-r--r--contrib/perl5/lib/ExtUtils/Embed.pm2
-rw-r--r--contrib/perl5/lib/ExtUtils/Install.pm2
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_OS2.pm33
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_VMS.pm110
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_Win32.pm31
-rw-r--r--contrib/perl5/lib/ExtUtils/MakeMaker.pm203
-rw-r--r--contrib/perl5/lib/ExtUtils/Manifest.pm4
-rw-r--r--contrib/perl5/lib/ExtUtils/Mkbootstrap.pm4
-rw-r--r--contrib/perl5/lib/ExtUtils/Mksymlists.pm50
-rw-r--r--contrib/perl5/lib/ExtUtils/typemap30
-rwxr-xr-xcontrib/perl5/lib/ExtUtils/xsubpp35
12 files changed, 334 insertions, 174 deletions
diff --git a/contrib/perl5/lib/ExtUtils/Command.pm b/contrib/perl5/lib/ExtUtils/Command.pm
index 2f5f1e1..e900e51 100644
--- a/contrib/perl5/lib/ExtUtils/Command.pm
+++ b/contrib/perl5/lib/ExtUtils/Command.pm
@@ -31,8 +31,8 @@ ExtUtils::Command - utilities to replace common UNIX commands in Makefiles etc.
=head1 DESCRIPTION
-The module is used in Win32 port to replace common UNIX commands.
-Most commands are wrapers on generic modules File::Path and File::Basename.
+The module is used in the Win32 port to replace common UNIX commands.
+Most commands are wrappers on generic modules File::Path and File::Basename.
=over 4
diff --git a/contrib/perl5/lib/ExtUtils/Embed.pm b/contrib/perl5/lib/ExtUtils/Embed.pm
index e41ca40..4b56e88 100644
--- a/contrib/perl5/lib/ExtUtils/Embed.pm
+++ b/contrib/perl5/lib/ExtUtils/Embed.pm
@@ -416,7 +416,7 @@ This will print arguments for linking with B<libperl.a>, B<DynaLoader> and
extensions found in B<$Config{static_ext}>. This includes libraries
found in B<$Config{libs}> and the first ModuleName.a library
for each extension that is found by searching B<@INC> or the path
-specifed by the B<-I> option.
+specified by the B<-I> option.
In addition, when ModuleName.a is found, additional linker arguments
are picked up from the B<extralibs.ld> file in the same directory.
diff --git a/contrib/perl5/lib/ExtUtils/Install.pm b/contrib/perl5/lib/ExtUtils/Install.pm
index 6a5c184..f75aa55 100644
--- a/contrib/perl5/lib/ExtUtils/Install.pm
+++ b/contrib/perl5/lib/ExtUtils/Install.pm
@@ -354,7 +354,7 @@ The argument is the value of MakeMaker's C<FULLEXT> key, like F<Tk/Canvas>.
This function calls install() with the same arguments as the defaults
the MakeMaker would use.
-The argumement-less form is convenient for install scripts like
+The argument-less form is convenient for install scripts like
perl -MExtUtils::Install -e install_default Tk/Canvas
diff --git a/contrib/perl5/lib/ExtUtils/MM_OS2.pm b/contrib/perl5/lib/ExtUtils/MM_OS2.pm
index 8bddb42..5d6034c 100644
--- a/contrib/perl5/lib/ExtUtils/MM_OS2.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_OS2.pm
@@ -15,6 +15,7 @@ sub dlsyms {
my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
+ my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
my($imports) = $attribs{IMPORTS} || $self->{IMPORTS} || {};
my(@m);
(my $boot = $self->{NAME}) =~ s/:/_/g;
@@ -27,14 +28,46 @@ $self->{BASEEXT}.def: Makefile.PL
Mksymlists("NAME" => "', $self->{NAME},
'", "DLBASE" => "',$self->{DLBASE},
'", "DL_FUNCS" => ',neatvalue($funcs),
+ ', "FUNCLIST" => ',neatvalue($funclist),
', "IMPORTS" => ',neatvalue($imports),
', "VERSION" => "',$self->{VERSION},
'", "DL_VARS" => ', neatvalue($vars), ');\'
');
}
+ if (%{$self->{IMPORTS}}) {
+ # Make import files (needed for static build)
+ -d 'tmp_imp' or mkdir 'tmp_imp', 0777 or die "Can't mkdir tmp_imp";
+ open IMP, '>tmpimp.imp' or die "Can't open tmpimp.imp";
+ my ($name, $exp);
+ while (($name, $exp)= each %{$self->{IMPORTS}}) {
+ my ($lib, $id) = ($exp =~ /(.*)\.(.*)/) or die "Malformed IMPORT `$exp'";
+ print IMP "$name $lib $id ?\n";
+ }
+ close IMP or die "Can't close tmpimp.imp";
+ # print "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp\n";
+ system "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp"
+ and die "Cannot make import library: $!, \$?=$?";
+ unlink <tmp_imp/*>;
+ system "cd tmp_imp; $Config::Config{ar} x ../tmpimp$Config::Config{lib_ext}"
+ and die "Cannot extract import objects: $!, \$?=$?";
+ }
join('',@m);
}
+sub static_lib {
+ my($self) = @_;
+ my $old = $self->ExtUtils::MM_Unix::static_lib();
+ return $old unless %{$self->{IMPORTS}};
+
+ my @chunks = split /\n{2,}/, $old;
+ shift @chunks unless length $chunks[0]; # Empty lines at the start
+ $chunks[0] .= <<'EOC';
+
+ $(AR) $(AR_STATIC_ARGS) $@ tmp_imp/* && $(RANLIB) $@
+EOC
+ return join "\n\n". '', @chunks;
+}
+
sub replace_manpage_separator {
my($self,$man) = @_;
$man =~ s,/+,.,g;
diff --git a/contrib/perl5/lib/ExtUtils/MM_VMS.pm b/contrib/perl5/lib/ExtUtils/MM_VMS.pm
index d7e59c2..8f8ac17 100644
--- a/contrib/perl5/lib/ExtUtils/MM_VMS.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_VMS.pm
@@ -3,7 +3,7 @@
# This package is inserted into @ISA of MakeMaker's MM before the
# built-in ExtUtils::MM_Unix methods if MakeMaker.pm is run under VMS.
#
-# Author: Charles Bailey bailey@genetics.upenn.edu
+# Author: Charles Bailey bailey@newman.upenn.edu
package ExtUtils::MM_VMS;
@@ -14,7 +14,7 @@ use VMS::Filespec;
use File::Basename;
use vars qw($Revision);
-$Revision = '5.42 (31-Mar-1997)';
+$Revision = '5.52 (12-Sep-1998)';
unshift @MM::ISA, 'ExtUtils::MM_VMS';
@@ -829,7 +829,7 @@ sub cflags {
$quals =~ s/ -$type$def\s*//;
$def =~ s/"/""/g;
if ($type eq 'D') { $definestr .= qq["$def",]; }
- elsif ($type eq 'I') { $flagincstr .= ',' . $self->fixpath($def,1); }
+ elsif ($type eq 'I') { $incstr .= ',' . $self->fixpath($def,1); }
else { $undefstr .= qq["$def",]; }
}
}
@@ -869,7 +869,7 @@ sub cflags {
my(@includes) = split(/\s+/,$self->{INC});
foreach (@includes) {
s/^-I//;
- $incstr .= ', '.$self->fixpath($_,1);
+ $incstr .= ','.$self->fixpath($_,1);
}
}
$quals .= "$incstr)";
@@ -1322,6 +1322,7 @@ sub dlsyms {
my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
+ my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
my(@m);
unless ($self->{SKIPHASH}{'dynamic'}) {
@@ -1343,7 +1344,8 @@ $(INST_ARCHAUTODIR)$(BASEEXT).opt : $(BASEEXT).opt
$(BASEEXT).opt : Makefile.PL
$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Mksymlists;" -
',qq[-e "Mksymlists('NAME' => '$self->{NAME}', 'DL_FUNCS' => ],
- neatvalue($funcs),q[, 'DL_VARS' => ],neatvalue($vars),')"
+ neatvalue($funcs),q[, 'DL_VARS' => ],neatvalue($vars),
+ q[, 'FUNCLIST' => ],neatvalue($funclist),')"
$(PERL) -e "print ""$(INST_STATIC)/Include=$(BASEEXT)\n$(INST_STATIC)/Library\n"";" >>$(MMS$TARGET)
');
@@ -1389,7 +1391,7 @@ INST_DYNAMIC_DEP = $inst_dynamic_dep
push @m, '
$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt $(INST_ARCHAUTODIR).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
- $(NOECHO) If F$TrnLNm("',$shr,'").eqs."" Then Define/NoLog/User ',"$shr Sys\$Share:$shr.$Config{'dlext'}",'
+ If F$TrnLNm("',$shr,'").eqs."" Then Define/NoLog/User ',"$shr Sys\$Share:$shr.$Config{'dlext'}",'
Link $(LDFLAGS) /Shareable=$(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,$(PERL_INC)perlshr_attr.opt/Option
';
@@ -1441,7 +1443,7 @@ $(INST_STATIC) :
$(NOECHO) $(NOOP)
' unless ($self->{OBJECT} or @{$self->{C} || []} or $self->{MYEXTLIB});
- my(@m);
+ my(@m,$lib);
push @m,'
# Rely on suffix rule for update action
$(OBJECT) : $(INST_ARCHAUTODIR).exists
@@ -1463,7 +1465,10 @@ $(INST_STATIC) : $(OBJECT) $(MYEXTLIB)
push(@m,"\t",'Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)',"\n");
}
- push(@m,"\t",'$(NOECHO) $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR)extralibs.ld\';print F qq{$(EXTRALIBS)\n};close F;"',"\n");
+ foreach $lib (split $self->{EXTRALIBS}) {
+ $lib = '""' if $lib eq '"';
+ push(@m,"\t",'$(NOECHO) $(PERL) -e "print qq{',$lib,'\n}" >>$(INST_ARCHAUTODIR)extralibs.ld',"\n");
+ }
push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
join('',@m);
}
@@ -1530,15 +1535,20 @@ sub processPL {
return "" unless $self->{PL_FILES};
my(@m, $plfile);
foreach $plfile (sort keys %{$self->{PL_FILES}}) {
- my $vmsplfile = vmsify($plfile);
- my $vmsfile = vmsify($self->{PL_FILES}->{$plfile});
- push @m, "
+ my $list = ref($self->{PL_FILES}->{$plfile})
+ ? $self->{PL_FILES}->{$plfile}
+ : [$self->{PL_FILES}->{$plfile}];
+ foreach $target (@$list) {
+ my $vmsplfile = vmsify($plfile);
+ my $vmsfile = vmsify($target);
+ push @m, "
all :: $vmsfile
\$(NOECHO) \$(NOOP)
$vmsfile :: $vmsplfile
-",' $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" '," $vmsplfile
+",' $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" '," $vmsplfile $vmsfile
";
+ }
}
join "", @m;
}
@@ -2188,7 +2198,8 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE)
}
- my($linkcmd,@staticopts,@staticpkgs,$extralist,$targdir,$libperldir);
+ my($linkcmd,@optlibs,@staticpkgs,$extralist,$targdir,$libperldir,%libseen);
+ local($_);
# The front matter of the linkcommand...
$linkcmd = join ' ', $Config{'ld'},
@@ -2251,28 +2262,46 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE)
# (e.g. Intuit::DWIM will precede Intuit, so unresolved
# references from [.intuit.dwim]dwim.obj can be found
# in [.intuit]intuit.olb).
- for (sort keys %olbs) {
+ for (sort { length($a) <=> length($b) } keys %olbs) {
next unless $olbs{$_} =~ /\Q$self->{LIB_EXT}\E$/;
my($dir) = $self->fixpath($_,1);
my($extralibs) = $dir . "extralibs.ld";
my($extopt) = $dir . $olbs{$_};
$extopt =~ s/$self->{LIB_EXT}$/.opt/;
+ push @optlibs, "$dir$olbs{$_}";
+ # Get external libraries this extension will need
if (-f $extralibs ) {
+ my %seenthis;
open LIST,$extralibs or warn $!,next;
- push @$extra, <LIST>;
+ while (<LIST>) {
+ chomp;
+ # Include a library in the link only once, unless it's mentioned
+ # multiple times within a single extension's options file, in which
+ # case we assume the builder needed to search it again later in the
+ # link.
+ my $skip = exists($libseen{$_}) && !exists($seenthis{$_});
+ $libseen{$_}++; $seenthis{$_}++;
+ next if $skip;
+ push @$extra,$_;
+ }
close LIST;
}
+ # Get full name of extension for ExtUtils::Miniperl
if (-f $extopt) {
open OPT,$extopt or die $!;
while (<OPT>) {
next unless /(?:UNIVERSAL|VECTOR)=boot_([\w_]+)/;
- # ExtUtils::Miniperl expects Unix paths
- (my($pkg) = "$1_$1$self->{LIB_EXT}") =~ s#_*#/#g;
+ my $pkg = $1;
+ $pkg =~ s#__*#::#g;
push @staticpkgs,$pkg;
}
- push @staticopts, $extopt;
}
}
+ # Place all of the external libraries after all of the Perl extension
+ # libraries in the final link, in order to maximize the opportunity
+ # for XS code from multiple extensions to resolve symbols against the
+ # same external library while only including that library once.
+ push @optlibs, @$extra;
$target = "Perl$Config{'exe_ext'}" unless $target;
($shrtarget,$targdir) = fileparse($target);
@@ -2281,11 +2310,11 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE)
$target = "Perlshr.$Config{'dlext'}" unless $target;
$tmp = "[]" unless $tmp;
$tmp = $self->fixpath($tmp,1);
- if (@$extra) {
- $extralist = join(' ',@$extra);
- $extralist =~ s/[,\s\n]+/, /g;
- }
- else { $extralist = ''; }
+ if (@optlibs) { $extralist = join(' ',@optlibs); }
+ else { $extralist = ''; }
+ # Let ExtUtils::Liblist find the necessary for us (but skip PerlShr;
+ # that's what we're building here).
+ push @optlibs, grep { !/PerlShr/i } split +($self->ext())[2];
if ($libperl) {
unless (-f $libperl || -f ($libperl = $self->catfile($Config{'installarchlib'},'CORE',$libperl))) {
print STDOUT "Warning: $libperl not found\n";
@@ -2309,19 +2338,22 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE)
MAP_TARGET = ',$self->fixpath($target,0),'
MAP_SHRTARGET = ',$self->fixpath($shrtarget,0),"
MAP_LINKCMD = $linkcmd
-MAP_PERLINC = ", $perlinc ? map('"$_" ',@{$perlinc}) : '','
-# We use the linker options files created with each extension, rather than
-#specifying the object files directly on the command line.
-MAP_STATIC = ',@staticopts ? join(' ', @staticopts) : '','
-MAP_OPTS = ',@staticopts ? ','.join(',', map($_.'/Option', @staticopts)) : '',"
+MAP_PERLINC = ", $perlinc ? map('"$_" ',@{$perlinc}) : '',"
MAP_EXTRA = $extralist
MAP_LIBPERL = ",$self->fixpath($libperl,0),'
';
- push @m,'
-$(MAP_SHRTARGET) : $(MAP_LIBPERL) $(MAP_STATIC) ',"${libperldir}Perlshr_Attr.Opt",'
- $(MAP_LINKCMD)/Shareable=$(MMS$TARGET) $(MAP_OPTS), $(MAP_EXTRA), $(MAP_LIBPERL) ',"${libperldir}Perlshr_Attr.Opt",'
+ push @m,"\n${tmp}Makeaperl.Opt : \$(MAP_EXTRA)\n";
+ foreach (@optlibs) {
+ push @m,' $(NOECHO) $(PERL) -e "print q{',$_,'}" >>$(MMS$TARGET)',"\n";
+ }
+ push @m,"\n${tmp}PerlShr.Opt :\n\t";
+ push @m,'$(NOECHO) $(PERL) -e "print q{$(MAP_SHRTARGET)}" >$(MMS$TARGET)',"\n";
+
+push @m,'
+$(MAP_SHRTARGET) : $(MAP_LIBPERL) Makeaperl.Opt ',"${libperldir}Perlshr_Attr.Opt",'
+ $(MAP_LINKCMD)/Shareable=$(MMS$TARGET) $(MAP_LIBPERL), Makeaperl.Opt/Option ',"${libperldir}Perlshr_Attr.Opt/Option",'
$(MAP_TARGET) : $(MAP_SHRTARGET) ',"${tmp}perlmain\$(OBJ_EXT) ${tmp}PerlShr.Opt",'
$(MAP_LINKCMD) ',"${tmp}perlmain\$(OBJ_EXT)",', PerlShr.Opt/Option
$(NOECHO) $(SAY) "To install the new ""$(MAP_TARGET)"" binary, say"
@@ -2329,13 +2361,17 @@ $(MAP_TARGET) : $(MAP_SHRTARGET) ',"${tmp}perlmain\$(OBJ_EXT) ${tmp}PerlShr.Opt"
$(NOECHO) $(SAY) "To remove the intermediate files, say
$(NOECHO) $(SAY) " $(MMS)$(MMSQUALIFIERS)$(USEMAKEFILE)$(MAKEFILE) map_clean"
';
- push @m,'
-',"${tmp}perlmain.c",' : $(MAKEFILE)
- $(NOECHO) $(PERL) $(MAP_PERLINC) -e "use ExtUtils::Miniperl; writemain(qw|',@staticpkgs,'|)" >$(MMS$TARGET)
-';
+ push @m,"\n${tmp}perlmain.c : \$(MAKEFILE)\n\t\$(NOECHO) \$(PERL) -e 1 >${tmp}Writemain.tmp\n";
+ push @m, "# More from the 255-char line length limit\n";
+ foreach (@staticpkgs) {
+ push @m,' $(NOECHO) $(PERL) -e "print q{',$_,qq[}" >>${tmp}Writemain.tmp\n];
+ }
+ push @m,'
+ $(NOECHO) $(PERL) $(MAP_PERLINC) -ane "use ExtUtils::Miniperl; writemain(@F)" ',$tmp,'Writemain.tmp >$(MMS$TARGET)
+ $(NOECHO) $(RM_F) ',"${tmp}Writemain.tmp\n";
push @m, q[
-# More from the 255-char line length limit
+# Still more from the 255-char line length limit
doc_inst_perl :
$(NOECHO) $(PERL) -e "print 'Perl binary $(MAP_TARGET)|'" >.MM_tmp
$(NOECHO) $(PERL) -e "print 'MAP_STATIC|$(MAP_STATIC)|'" >>.MM_tmp
@@ -2358,7 +2394,7 @@ clean :: map_clean
map_clean :
\$(RM_F) ${tmp}perlmain\$(OBJ_EXT) ${tmp}perlmain.c \$(MAKEFILE)
- \$(RM_F) ${tmp}PerlShr.Opt \$(MAP_TARGET)
+ \$(RM_F) ${tmp}Makeaperl.Opt ${tmp}PerlShr.Opt \$(MAP_TARGET)
";
join '', @m;
diff --git a/contrib/perl5/lib/ExtUtils/MM_Win32.pm b/contrib/perl5/lib/ExtUtils/MM_Win32.pm
index a1226b5..4070b2e 100644
--- a/contrib/perl5/lib/ExtUtils/MM_Win32.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_Win32.pm
@@ -33,6 +33,7 @@ $BORLAND = 1 if $Config{'cc'} =~ /^bcc/i;
$GCC = 1 if $Config{'cc'} =~ /^gcc/i;
$DMAKE = 1 if $Config{'make'} =~ /^dmake/i;
$NMAKE = 1 if $Config{'make'} =~ /^nmake/i;
+$PERLMAKE = 1 if $Config{'make'} =~ /^pmake/i;
$OBJ = 1 if $Config{'ccflags'} =~ /PERL_OBJECT/i;
sub dlsyms {
@@ -40,6 +41,7 @@ sub dlsyms {
my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
+ my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
my($imports) = $attribs{IMPORTS} || $self->{IMPORTS} || {};
my(@m);
(my $boot = $self->{NAME}) =~ s/:/_/g;
@@ -52,6 +54,7 @@ $self->{BASEEXT}.def: Makefile.PL
-e "Mksymlists('NAME' => '!, $self->{NAME},
q!', 'DLBASE' => '!,$self->{DLBASE},
q!', 'DL_FUNCS' => !,neatvalue($funcs),
+ q!, 'FUNCLIST' => !,neatvalue($funclist),
q!, 'IMPORTS' => !,neatvalue($imports),
q!, 'DL_VARS' => !, neatvalue($vars), q!);"
!);
@@ -445,11 +448,18 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)\.exists
$(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp
dlltool --def $(EXPORT_LIST) --base-file dll.base --output-exp dll.exp
$(LD) -o $@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp });
- } else {
- push(@m, $BORLAND ?
- q{ $(LD) $(LDDLFLAGS) $(OTHERLDFLAGS) }.$ldfrom.q{,$@,,$(PERL_ARCHIVE:s,/,\,) $(LDLOADLIBS:s,/,\,) $(MYEXTLIB:s,/,\,),$(EXPORT_LIST:s,/,\,),$(RESFILES)} :
- q{ $(LD) -out:$@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) -def:$(EXPORT_LIST)}
- );
+ } elsif ($BORLAND) {
+ push(@m,
+ q{ $(LD) $(LDDLFLAGS) $(OTHERLDFLAGS) }.$ldfrom.q{,$@,,}
+ .($DMAKE ? q{$(PERL_ARCHIVE:s,/,\,) $(LDLOADLIBS:s,/,\,) }
+ .q{$(MYEXTLIB:s,/,\,),$(EXPORT_LIST:s,/,\,)}
+ : q{$(subst /,\,$(PERL_ARCHIVE)) $(subst /,\,$(LDLOADLIBS)) }
+ .q{$(subst /,\,$(MYEXTLIB)),$(subst /,\,$(EXPORT_LIST))})
+ .q{,$(RESFILES)});
+ } else { # VC
+ push(@m,
+ q{ $(LD) -out:$@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) }
+ .q{$(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) -def:$(EXPORT_LIST)});
}
push @m, '
$(CHMOD) 755 $@
@@ -463,7 +473,7 @@ sub perl_archive
{
my ($self) = @_;
if($OBJ) {
- if ($self->{CAPI} eq 'TRUE') {
+ if ($self->{CAPI}) {
return '$(PERL_INC)\perlCAPI$(LIB_EXT)';
}
}
@@ -524,10 +534,11 @@ sub pm_to_blib {
pm_to_blib: $(TO_INST_PM)
}.$self->{NOECHO}.q{$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
"-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
- -e "pm_to_blib(qw[ }.
- ($NMAKE ? '<<pmfiles.dat'
- : '$(mktmp,pmfiles.dat $(PM_TO_BLIB:s,\\,\\\\,)\n)').
- q{ ],'}.$autodir.q{')"
+ -e "pm_to_blib(}.
+ ($NMAKE ? 'qw[ <<pmfiles.dat ],'
+ : $DMAKE ? 'qw[ $(mktmp,pmfiles.dat $(PM_TO_BLIB:s,\\,\\\\,)\n) ],'
+ : '{ qw[$(PM_TO_BLIB)] },'
+ ).q{'}.$autodir.q{')"
}. ($NMAKE ? q{
$(PM_TO_BLIB)
<<
diff --git a/contrib/perl5/lib/ExtUtils/MakeMaker.pm b/contrib/perl5/lib/ExtUtils/MakeMaker.pm
index 5b7bb0b..08a1c66 100644
--- a/contrib/perl5/lib/ExtUtils/MakeMaker.pm
+++ b/contrib/perl5/lib/ExtUtils/MakeMaker.pm
@@ -2,7 +2,7 @@ BEGIN {require 5.002;} # MakeMaker 5.17 was the last MakeMaker that was compatib
package ExtUtils::MakeMaker;
-$Version = $VERSION = "5.4301";
+$VERSION = "5.4302";
$Version_OK = "5.17"; # Makefiles older than $Version_OK will die
# (Will be checked from MakeMaker version 4.13 onwards)
($Revision = substr(q$Revision: 1.222 $, 10)) =~ s/\s+$//;
@@ -35,9 +35,7 @@ use vars qw(
#
@ISA = qw(Exporter);
@EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt);
-@EXPORT_OK = qw($VERSION &Version_check &neatvalue &mkbootstrap &mksymlists
- $Version);
- # $Version in mixed case will go away!
+@EXPORT_OK = qw($VERSION &Version_check &neatvalue &mkbootstrap &mksymlists);
#
# Dummy package MM inherits actual methods from OS-specific
@@ -73,10 +71,6 @@ $Is_OS2 = $^O eq 'os2';
$Is_Mac = $^O eq 'MacOS';
$Is_Win32 = $^O eq 'MSWin32';
-# This is for module authors to query, so they can enable 'CAPI' => 'TRUE'
-# in their Makefile.pl
-$CAPI_support = 1;
-
require ExtUtils::MM_Unix;
if ($Is_VMS) {
@@ -192,7 +186,7 @@ sub prompt ($;$) {
} else {
print "$def\n";
}
- return $ans || $def;
+ return ($ans ne '') ? $ans : $def;
}
sub eval_in_subdirs {
@@ -241,29 +235,23 @@ sub full_setup {
@Attrib_help = qw/
- AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION LICENSE_HREF CAPI
- C CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
- EXE_FILES EXCLUDE_EXT INCLUDE_EXT NO_VC FIRST_MAKEFILE FULLPERL H
- INC INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLMAN1DIR
+ AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
+ C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
+ EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FUNCLIST H IMPORTS
+ INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLMAN1DIR
INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
INSTALLSITELIB INST_ARCHLIB INST_BIN INST_EXE INST_LIB
- INST_MAN1DIR INST_MAN3DIR INST_SCRIPT LDFROM LIBPERL_A LIB LIBS
+ INST_MAN1DIR INST_MAN3DIR INST_SCRIPT LDFROM LIB LIBPERL_A LIBS
LINKTYPE MAKEAPERL MAKEFILE MAN1PODS MAN3PODS MAP_TARGET MYEXTLIB
- NAME NEEDS_LINKING NOECHO NORECURS OBJECT OPTIMIZE PERL PERLMAINCC
+ NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC
PERL_ARCHLIB PERL_LIB PERL_SRC PERM_RW PERM_RWX
- PL_FILES PM PMLIBDIRS PREFIX
+ PL_FILES PM PMLIBDIRS PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREFIX
PREREQ_PM SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
- tool_autosplit PPM_INSTALL_SCRIPT PPM_INSTALL_EXEC
-
- IMPORTS
-
- installpm
+ tool_autosplit
/;
- # IMPORTS is used under OS/2
-
- # ^^^ installpm is deprecated, will go about Summer 96
+ # IMPORTS is used under OS/2 and Win32
# @Overridable is close to @MM_Sections but not identical. The
# order is important. Many subroutines declare macros. These
@@ -428,6 +416,7 @@ sub ExtUtils::MakeMaker::new {
}
my $newclass = ++$PACKNAME;
+ local @Parent = @Parent; # Protect against non-local exits
{
# no strict;
print "Blessing Object into class [$newclass]\n" if $Verbose>=2;
@@ -450,9 +439,17 @@ sub ExtUtils::MakeMaker::new {
unless $self->file_name_is_absolute($self->{$key})
|| ($^O eq 'VMS' and ($key =~ /PERL$/ && $self->{$key} =~ /^[\w\-\$]+$/));
}
- $self->{PARENT}->{CHILDREN}->{$newclass} = $self if $self->{PARENT};
+ if ($self->{PARENT}) {
+ $self->{PARENT}->{CHILDREN}->{$newclass} = $self;
+ if (exists $self->{PARENT}->{CAPI}
+ and not exists $self->{CAPI})
+ {
+ # inherit, but only if already unspecified
+ $self->{CAPI} = $self->{PARENT}->{CAPI};
+ }
+ }
} else {
- parse_args($self,@ARGV);
+ parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV);
}
$self->{NAME} ||= $self->guess_name;
@@ -487,6 +484,9 @@ END
$self->init_dirscan();
$self->init_others();
+ my($argv) = neatvalue(\@ARGV);
+ $argv =~ s/^\[/(/;
+ $argv =~ s/\]$/)/;
push @{$self->{RESULT}}, <<END;
# This Makefile is for the $self->{NAME} extension to perl.
@@ -497,6 +497,8 @@ END
#
# ANY CHANGES MADE HERE WILL BE LOST!
#
+# MakeMaker ARGV: $argv
+#
# MakeMaker Parameters:
END
@@ -541,7 +543,6 @@ END
}
push @{$self->{RESULT}}, "\n# End.";
- pop @Parent;
$self;
}
@@ -1026,7 +1027,7 @@ This will replace the string specified by $Config{prefix} in all
$Config{install*} values.
Note, that in both cases the tilde expansion is done by MakeMaker, not
-by perl by default, nor by make. Conflicts between parmeters LIB,
+by perl by default, nor by make. Conflicts between parameters LIB,
PREFIX and the various INSTALL* arguments are resolved so that
XXX
@@ -1176,12 +1177,33 @@ recommends it (or you know what you're doing).
The following attributes can be specified as arguments to WriteMakefile()
or as NAME=VALUE pairs on the command line:
-=cut
+=over 2
-# The following "=item C" is used by the attrib_help routine
-# likewise the "=back" below. So be careful when changing it!
+=item AUTHOR
-=over 2
+String containing name (and email address) of package author(s). Is used
+in PPD (Perl Package Description) files for PPM (Perl Package Manager).
+
+=item ABSTRACT
+
+One line description of the module. Will be included in PPD file.
+
+=item ABSTRACT_FROM
+
+Name of the file that contains the package description. MakeMaker looks
+for a line in the POD matching /^($package\s-\s)(.*)/. This is typically
+the first line in the "=head1 NAME" section. $2 becomes the abstract.
+
+=item BINARY_LOCATION
+
+Used when creating PPD files for binary packages. It can be set to a
+full or relative path or URL to the binary archive for a particular
+architecture. For example:
+
+ perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz
+
+builds a PPD package that references a binary of the C<Agent> package,
+located in the C<x86> directory relative to the PPD itself.
=item C
@@ -1189,6 +1211,14 @@ Ref to array of *.c file names. Initialised from a directory scan
and the values portion of the XS attribute hash. This is not
currently used by MakeMaker but may be handy in Makefile.PLs.
+=item CAPI
+
+Switch to force usage of the Perl C API even when compiling for PERL_OBJECT.
+
+Note that this attribute is passed through to any recursive build,
+but if and only if the submodule's Makefile.PL itself makes no mention
+of the 'CAPI' attribute.
+
=item CCFLAGS
String that will be included in the compiler call command line between
@@ -1237,12 +1267,12 @@ NAME above.
=item DL_FUNCS
-Hashref of symbol names for routines to be made available as
-universal symbols. Each key/value pair consists of the package name
-and an array of routine names in that package. Used only under AIX
-(export lists) and VMS (linker options) at present. The routine
-names supplied will be expanded in the same way as XSUB names are
-expanded by the XS() macro. Defaults to
+Hashref of symbol names for routines to be made available as universal
+symbols. Each key/value pair consists of the package name and an
+array of routine names in that package. Used only under AIX, OS/2,
+VMS and Win32 at present. The routine names supplied will be expanded
+in the same way as XSUB names are expanded by the XS() macro.
+Defaults to
{"$(NAME)" => ["boot_$(NAME)" ] }
@@ -1251,12 +1281,14 @@ e.g.
{"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
"NetconfigPtr" => [ 'DESTROY'] }
+Please see the L<ExtUtils::Mksymlists> documentation for more information
+about the DL_FUNCS, DL_VARS and FUNCLIST attributes.
+
=item DL_VARS
-Array of symbol names for variables to be made available as
-universal symbols. Used only under AIX (export lists) and VMS
-(linker options) at present. Defaults to []. (e.g. [ qw(
-Foo_version Foo_numstreams Foo_tree ) ])
+Array of symbol names for variables to be made available as universal symbols.
+Used only under AIX, OS/2, VMS and Win32 at present. Defaults to [].
+(e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ])
=item EXCLUDE_EXT
@@ -1265,7 +1297,7 @@ is ignored if INCLUDE_EXT is present. Consult INCLUDE_EXT for more
details. (e.g. [ qw( Socket POSIX ) ] )
This attribute may be most useful when specified as a string on the
-commandline: perl Makefile.PL EXCLUDE_EXT='Socket Safe'
+command line: perl Makefile.PL EXCLUDE_EXT='Socket Safe'
=item EXE_FILES
@@ -1273,13 +1305,6 @@ Ref to array of executable files. The files will be copied to the
INST_SCRIPT directory. Make realclean will delete them from there
again.
-=item NO_VC
-
-In general any generated Makefile checks for the current version of
-MakeMaker and the version the Makefile was built under. If NO_VC is
-set, the version check is neglected. Do not write this into your
-Makefile.PL, use it interactively instead.
-
=item FIRST_MAKEFILE
The name of the Makefile to be produced. Defaults to the contents of
@@ -1290,13 +1315,21 @@ that will be produced for the MAP_TARGET.
Perl binary able to run this extension.
+=item FUNCLIST
+
+This provides an alternate means to specify function names to be
+exported from the extension. Its value is a reference to an
+array of function names to be exported by the extension. These
+names are passed through unaltered to the linker options file.
+
=item H
Ref to array of *.h file names. Similar to C.
=item IMPORTS
-IMPORTS is only used on OS/2.
+This attribute is used to specify names to be imported into the
+extension. It is only used on OS/2 and Win32.
=item INC
@@ -1315,7 +1348,7 @@ filling in INCLUDE_EXT. If the INCLUDE_EXT is mentioned but is empty then
only DynaLoader and the current extension will be included in the build.
This attribute may be most useful when specified as a string on the
-commandline: perl Makefile.PL INCLUDE_EXT='POSIX Socket Devel::Peek'
+command line: perl Makefile.PL INCLUDE_EXT='POSIX Socket Devel::Peek'
=item INSTALLARCHLIB
@@ -1353,14 +1386,14 @@ directory if INSTALLDIRS is set to perl.
Used by 'make install' which copies files from INST_SCRIPT to this
directory.
-=item INSTALLSITELIB
+=item INSTALLSITEARCH
-Used by 'make install', which copies files from INST_LIB to this
+Used by 'make install', which copies files from INST_ARCHLIB to this
directory if INSTALLDIRS is set to site (default).
-=item INSTALLSITEARCH
+=item INSTALLSITELIB
-Used by 'make install', which copies files from INST_ARCHLIB to this
+Used by 'make install', which copies files from INST_LIB to this
directory if INSTALLDIRS is set to site (default).
=item INST_ARCHLIB
@@ -1403,16 +1436,16 @@ defaults to "$(OBJECT)" and is used in the ld command to specify
what files to link/load from (also see dynamic_lib below for how to
specify ld flags)
-=item LIBPERL_A
-
-The filename of the perllibrary that will be used together with this
-extension. Defaults to libperl.a.
-
=item LIB
LIB can only be set at C<perl Makefile.PL> time. It has the effect of
setting both INSTALLPRIVLIB and INSTALLSITELIB to that value regardless any
+=item LIBPERL_A
+
+The filename of the perllibrary that will be used together with this
+extension. Defaults to libperl.a.
+
=item LIBS
An anonymous array of alternative library
@@ -1497,6 +1530,13 @@ itself.
Boolean. Attribute to inhibit descending into subdirectories.
+=item NO_VC
+
+In general any generated Makefile checks for the current version of
+MakeMaker and the version the Makefile was built under. If NO_VC is
+set, the version check is neglected. Do not write this into your
+Makefile.PL, use it interactively instead.
+
=item OBJECT
List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
@@ -1532,7 +1572,7 @@ avoided, it may be undefined)
=item PERM_RW
-Desired Permission for read/writable files. Defaults to C<644>.
+Desired permission for read/writable files. Defaults to C<644>.
See also L<MM_Unix/perm_rw>.
=item PERM_RWX
@@ -1549,7 +1589,11 @@ and the basename of the file being the value. E.g.
{'foobar.PL' => 'foobar'}
The *.PL files are expected to produce output to the target files
-themselves.
+themselves. If multiple files can be generated from the same *.PL
+file then the value in the hash can be a reference to an array of
+target file names. E.g.
+
+ {'foobar.PL' => ['foobar1','foobar2']}
=item PM
@@ -1569,6 +1613,15 @@ they contain will be installed in the corresponding location in the
library. A libscan() method can be used to alter the behaviour.
Defining PM in the Makefile.PL will override PMLIBDIRS.
+=item PPM_INSTALL_EXEC
+
+Name of the executable used to run C<PPM_INSTALL_SCRIPT> below. (e.g. perl)
+
+=item PPM_INSTALL_SCRIPT
+
+Name of the script that gets executed by the Perl Package Manager after
+the installation of a package.
+
=item PREFIX
Can be used to set the three INSTALL* attributes in one go (except for
@@ -1703,10 +1756,6 @@ links the rest. Default is 'best'.
{ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
-=item installpm
-
-Deprecated as of MakeMaker 5.23. See L<ExtUtils::MM_Unix/pm_to_blib>.
-
=item linkext
{LINKTYPE => 'static', 'dynamic' or ''}
@@ -1733,12 +1782,6 @@ be linked.
=back
-=cut
-
-# bug in pod2html, so leave the =back
-
-# Don't delete this cut, MM depends on it!
-
=head2 Overriding MakeMaker Methods
If you cannot achieve the desired Makefile behaviour by specifying
@@ -1916,6 +1959,18 @@ in a subdirectory of some other distribution, or is listed as a
dependency in a CPAN::Bundle, but the functionality is supported by
different means on the current architecture).
+=head1 ENVIRONMENT
+
+=over 8
+
+=item PERL_MM_OPT
+
+Command line options used by C<MakeMaker-E<gt>new()>, and thus by
+C<WriteMakefile()>. The string is split on whitespace, and the result
+is processed before any actual command line arguments are processed.
+
+=back
+
=head1 SEE ALSO
ExtUtils::MM_Unix, ExtUtils::Manifest, ExtUtils::testlib,
@@ -1925,7 +1980,7 @@ ExtUtils::Install, ExtUtils::Embed
Andy Dougherty <F<doughera@lafcol.lafayette.edu>>, Andreas KE<ouml>nig
<F<A.Koenig@franz.ww.TU-Berlin.DE>>, Tim Bunce <F<Tim.Bunce@ig.co.uk>>.
-VMS support by Charles Bailey <F<bailey@genetics.upenn.edu>>. OS/2
+VMS support by Charles Bailey <F<bailey@newman.upenn.edu>>. OS/2
support by Ilya Zakharevich <F<ilya@math.ohio-state.edu>>. Contact the
makemaker mailing list C<mailto:makemaker@franz.ww.tu-berlin.de>, if
you have any questions.
diff --git a/contrib/perl5/lib/ExtUtils/Manifest.pm b/contrib/perl5/lib/ExtUtils/Manifest.pm
index 5557089..1a6dde7 100644
--- a/contrib/perl5/lib/ExtUtils/Manifest.pm
+++ b/contrib/perl5/lib/ExtUtils/Manifest.pm
@@ -298,7 +298,7 @@ but in doing so checks each line in an existing C<MANIFEST> file and
includes any comments that are found in the existing C<MANIFEST> file
in the new one. Anything between white space and an end of line within
a C<MANIFEST> file is considered to be a comment. Filenames and
-comments are seperated by one or more TAB characters in the
+comments are separated by one or more TAB characters in the
output. All files that match any regular expression in a file
C<MANIFEST.SKIP> (if such a file exists) are ignored.
@@ -317,7 +317,7 @@ Fullcheck() does both a manicheck() and a filecheck().
Skipcheck() lists all the files that are skipped due to your
C<MANIFEST.SKIP> file.
-Manifind() retruns a hash reference. The keys of the hash are the
+Manifind() returns a hash reference. The keys of the hash are the
files found below the current directory.
Maniread($file) reads a named C<MANIFEST> file (defaults to
diff --git a/contrib/perl5/lib/ExtUtils/Mkbootstrap.pm b/contrib/perl5/lib/ExtUtils/Mkbootstrap.pm
index 35d5236..25c374c 100644
--- a/contrib/perl5/lib/ExtUtils/Mkbootstrap.pm
+++ b/contrib/perl5/lib/ExtUtils/Mkbootstrap.pm
@@ -1,6 +1,6 @@
package ExtUtils::Mkbootstrap;
-$VERSION = substr q$Revision: 1.13 $, 10;
+$VERSION = substr q$Revision: 1.14 $, 10;
# $Date: 1996/09/03 17:04:43 $
use Config;
@@ -49,7 +49,7 @@ sub Mkbootstrap {
print BS "# $baseext DynaLoader bootstrap file for $^O architecture.\n";
print BS "# Do not edit this file, changes will be lost.\n";
print BS "# This file was automatically generated by the\n";
- print BS "# Mkbootstrap routine in ExtUtils::Mkbootstrap (v$Version).\n";
+ print BS "# Mkbootstrap routine in ExtUtils::Mkbootstrap (v$VERSION).\n";
print BS "\@DynaLoader::dl_resolve_using = ";
# If @all contains names in the form -lxxx or -Lxxx then it's asking for
# runtime library location so we automatically add a call to dl_findfile()
diff --git a/contrib/perl5/lib/ExtUtils/Mksymlists.pm b/contrib/perl5/lib/ExtUtils/Mksymlists.pm
index 0b92ca0..76535d9 100644
--- a/contrib/perl5/lib/ExtUtils/Mksymlists.pm
+++ b/contrib/perl5/lib/ExtUtils/Mksymlists.pm
@@ -19,10 +19,10 @@ sub Mksymlists {
$spec{DL_VARS} = [] unless $spec{DL_VARS};
($spec{FILE} = $spec{NAME}) =~ s/.*::// unless $spec{FILE};
+ $spec{FUNCLIST} = [] unless $spec{FUNCLIST};
$spec{DL_FUNCS} = { $spec{NAME} => [] }
unless ( ($spec{DL_FUNCS} and keys %{$spec{DL_FUNCS}}) or
- $spec{FUNCLIST});
- $spec{FUNCLIST} = [] unless $spec{FUNCLIST};
+ @{$spec{FUNCLIST}});
if (defined $spec{DL_FUNCS}) {
my($package);
foreach $package (keys %{$spec{DL_FUNCS}}) {
@@ -89,10 +89,10 @@ sub _write_os2 {
print DEF join("\n ",@{$data->{FUNCLIST}}, "\n") if @{$data->{FUNCLIST}};
if (%{$data->{IMPORTS}}) {
print DEF "IMPORTS\n";
-my ($name, $exp);
-while (($name, $exp)= each %{$data->{IMPORTS}}) {
- print DEF " $name=$exp\n";
-}
+ my ($name, $exp);
+ while (($name, $exp)= each %{$data->{IMPORTS}}) {
+ print DEF " $name=$exp\n";
+ }
}
close DEF;
}
@@ -207,10 +207,13 @@ keys are recognized:
=over
-=item NAME
+=item DLBASE
-This gives the name of the extension (I<e.g.> Tk::Canvas) for which
-the linker option file will be produced.
+This item specifies the name by which the linker knows the
+extension, which may be different from the name of the
+extension itself (for instance, some linkers add an '_' to the
+name of the extension). If it is not specified, it is derived
+from the NAME attribute. It is presently used only by OS2 and Win32.
=item DL_FUNCS
@@ -219,7 +222,7 @@ from which it is usually taken. Its value is a reference to an
associative array, in which each key is the name of a package, and
each value is an a reference to an array of function names which
should be exported by the extension. For instance, one might say
-C<DL_FUNCS =E<gt> { Homer::Iliad =E<gt> [ qw(trojans greeks) ],
+C<DL_FUNCS =E<gt> { Homer::Iliad =E<gt> [ qw(trojans greeks) ],
Homer::Odyssey =E<gt> [ qw(travellers family suitors) ] }>. The
function names should be identical to those in the XSUB code;
C<Mksymlists> will alter the names written to the linker option
@@ -243,7 +246,7 @@ be exported by the extension.
This key can be used to specify the name of the linker option file
(minus the OS-specific extension), if for some reason you do not
want to use the default value, which is the last word of the NAME
-attribute (I<e.g.> for Tk::Canvas, FILE defaults to 'Canvas').
+attribute (I<e.g.> for C<Tk::Canvas>, FILE defaults to C<Canvas>).
=item FUNCLIST
@@ -251,14 +254,25 @@ This provides an alternate means to specify function names to be
exported from the extension. Its value is a reference to an
array of function names to be exported by the extension. These
names are passed through unaltered to the linker options file.
+Specifying a value for the FUNCLIST attribute suppresses automatic
+generation of the bootstrap function for the package. To still create
+the bootstrap name you have to specify the package name in the
+DL_FUNCS hash:
-=item DLBASE
+ Mksymlists({ NAME => $name ,
+ FUNCLIST => [ $func1, $func2 ],
+ DL_FUNCS => { $pkg => [] } });
-This item specifies the name by which the linker knows the
-extension, which may be different from the name of the
-extension itself (for instance, some linkers add an '_' to the
-name of the extension). If it is not specified, it is derived
-from the NAME attribute. It is presently used only by OS2.
+
+=item IMPORTS
+
+This attribute is used to specify names to be imported into the
+extension. It is currently only used by OS/2 and Win32.
+
+=item NAME
+
+This gives the name of the extension (I<e.g.> C<Tk::Canvas>) for which
+the linker option file will be produced.
=back
@@ -269,7 +283,7 @@ can be used to provide additional information to the linker.
=head1 AUTHOR
-Charles Bailey I<E<lt>bailey@genetics.upenn.eduE<gt>>
+Charles Bailey I<E<lt>bailey@newman.upenn.eduE<gt>>
=head1 REVISION
diff --git a/contrib/perl5/lib/ExtUtils/typemap b/contrib/perl5/lib/ExtUtils/typemap
index 28fd99c..b1ec063 100644
--- a/contrib/perl5/lib/ExtUtils/typemap
+++ b/contrib/perl5/lib/ExtUtils/typemap
@@ -1,12 +1,12 @@
# $Header$
# basic C types
int T_IV
-unsigned T_IV
-unsigned int T_IV
+unsigned T_UV
+unsigned int T_UV
long T_IV
-unsigned long T_IV
+unsigned long T_UV
short T_IV
-unsigned short T_IV
+unsigned short T_UV
char T_CHAR
unsigned char T_U_CHAR
char * T_PV
@@ -34,7 +34,7 @@ I16 T_IV
I8 T_IV
U32 T_U_LONG
U16 T_U_SHORT
-U8 T_IV
+U8 T_UV
Result T_U_CHAR
Boolean T_IV
double T_DOUBLE
@@ -73,6 +73,8 @@ T_CVREF
croak(\"$var is not of type ${ntype}\")
T_SYSRET
$var NOT IMPLEMENTED
+T_UV
+ $var = ($type)SvUV($arg)
T_IV
$var = ($type)SvIV($arg)
T_INT
@@ -82,19 +84,19 @@ T_ENUM
T_BOOL
$var = (int)SvIV($arg)
T_U_INT
- $var = (unsigned int)SvIV($arg)
+ $var = (unsigned int)SvUV($arg)
T_SHORT
$var = (short)SvIV($arg)
T_U_SHORT
- $var = (unsigned short)SvIV($arg)
+ $var = (unsigned short)SvUV($arg)
T_LONG
$var = (long)SvIV($arg)
T_U_LONG
- $var = (unsigned long)SvIV($arg)
+ $var = (unsigned long)SvUV($arg)
T_CHAR
$var = (char)*SvPV($arg,PL_na)
T_U_CHAR
- $var = (unsigned char)SvIV($arg)
+ $var = (unsigned char)SvUV($arg)
T_FLOAT
$var = (float)SvNV($arg)
T_NV
@@ -191,6 +193,8 @@ T_CVREF
$arg = newRV((SV*)$var);
T_IV
sv_setiv($arg, (IV)$var);
+T_UV
+ sv_setuv($arg, (UV)$var);
T_INT
sv_setiv($arg, (IV)$var);
T_SYSRET
@@ -205,19 +209,19 @@ T_ENUM
T_BOOL
$arg = boolSV($var);
T_U_INT
- sv_setiv($arg, (IV)$var);
+ sv_setuv($arg, (UV)$var);
T_SHORT
sv_setiv($arg, (IV)$var);
T_U_SHORT
- sv_setiv($arg, (IV)$var);
+ sv_setuv($arg, (UV)$var);
T_LONG
sv_setiv($arg, (IV)$var);
T_U_LONG
- sv_setiv($arg, (IV)$var);
+ sv_setuv($arg, (UV)$var);
T_CHAR
sv_setpvn($arg, (char *)&$var, 1);
T_U_CHAR
- sv_setiv($arg, (IV)$var);
+ sv_setuv($arg, (UV)$var);
T_FLOAT
sv_setnv($arg, (double)$var);
T_NV
diff --git a/contrib/perl5/lib/ExtUtils/xsubpp b/contrib/perl5/lib/ExtUtils/xsubpp
index 523dabc..1ee7b29 100755
--- a/contrib/perl5/lib/ExtUtils/xsubpp
+++ b/contrib/perl5/lib/ExtUtils/xsubpp
@@ -776,7 +776,7 @@ while (<$FH>) {
/^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/;
if ($OBJ) {
- s/#if(?:def|\s+defined)\s+(\(__cplusplus\)|__cplusplus)/#if defined(__cplusplus) && !defined(PERL_OBJECT)/;
+ s/#if(?:def\s|\s+defined)\s*(\(__cplusplus\)|__cplusplus)/#if defined(__cplusplus) && !defined(PERL_OBJECT)/;
}
print $_;
}
@@ -1254,30 +1254,37 @@ EOF
}
# print initialization routine
-if ($WantCAPI) {
+
print Q<<"EOF";
-#
##ifdef __cplusplus
#extern "C"
##endif
+EOF
+
+if ($WantCAPI) {
+print Q<<"EOF";
+##ifdef PERL_CAPI
#XS(boot__CAPI_entry)
-#[[
-# dXSARGS;
-# char* file = __FILE__;
-#
+##else
EOF
-} else {
+}
+
print Q<<"EOF";
-##ifdef __cplusplus
-#extern "C"
-##endif
#XS(boot_$Module_cname)
+EOF
+
+if ($WantCAPI) {
+print Q<<"EOF";
+##endif /* PERL_CAPI */
+EOF
+}
+
+print Q<<"EOF";
#[[
# dXSARGS;
# char* file = __FILE__;
#
EOF
-}
print Q<<"EOF" if $WantVersionChk ;
# XS_VERSION_BOOTCHECK ;
@@ -1312,7 +1319,7 @@ EOF
if ($WantCAPI) {
print Q<<"EOF";
-#
+##ifdef PERL_CAPI
##define XSCAPI(name) void name(CV* cv, void* pPerl)
#
##ifdef __cplusplus
@@ -1323,7 +1330,7 @@ print Q<<"EOF";
# SetCPerlObj(pPerl);
# boot__CAPI_entry(cv);
#]]
-#
+##endif /* PERL_CAPI */
EOF
}
OpenPOWER on IntegriCloud