use File::Basename qw(basename dirname fileparse);
use DirHandle;
use strict;
-our ($Is_Mac,$Is_OS2,$Is_VMS,$Is_Win32,$Is_Dos,$Is_PERL_OBJECT,
+our ($Is_Mac,$Is_OS2,$Is_VMS,$Is_Win32,$Is_Dos,
$Verbose,%pm,%static,$Xsubpp_Version);
our $VERSION = '1.12603';
$Is_Win32 = $^O eq 'MSWin32';
$Is_Dos = $^O eq 'dos';
-$Is_PERL_OBJECT = $Config{'ccflags'} =~ /-DPERL_OBJECT/;
-
if ($Is_VMS = $^O eq 'VMS') {
require VMS::Filespec;
import VMS::Filespec qw( &vmsify );
$cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/;
push @m, '
.c.i:
- '. $cpp_cmd . ' $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c > $*.i
+ '. $cpp_cmd . ' $(CCCDLFLAGS) -I$(PERL_INC) $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
';
}
push @m, '
.c.s:
- $(CCCMD) -S $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
+ $(CCCMD) -S $(CCCDLFLAGS) -I$(PERL_INC) $(PASTHRU_DEFINE) $(DEFINE) $*.c
';
push @m, '
.c$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
+ $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(PASTHRU_DEFINE) $(DEFINE) $*.c
';
push @m, '
.C$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.C
+ $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(PASTHRU_DEFINE) $(DEFINE) $*.C
' if $^O ne 'os2' and $^O ne 'MSWin32' and $^O ne 'dos'; #Case-specific
push @m, '
.cpp$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.cpp
+ $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(PASTHRU_DEFINE) $(DEFINE) $*.cpp
.cxx$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.cxx
+ $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(PASTHRU_DEFINE) $(DEFINE) $*.cxx
.cc$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.cc
+ $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(PASTHRU_DEFINE) $(DEFINE) $*.cc
';
join "", @m;
}
$self->{uc $_} ||= $cflags{$_}
}
- if ($Is_PERL_OBJECT) {
- $self->{CCFLAGS} =~ s/-DPERL_OBJECT(\b|$)/-DPERL_CAPI/g;
- if ($Is_Win32) {
- if ($Config{'cc'} =~ /^cl/i) {
- # Turn off C++ mode of the MSC compiler
- $self->{CCFLAGS} =~ s/-TP(\s|$)//g;
- $self->{OPTIMIZE} =~ s/-TP(\s|$)//g;
- }
- elsif ($Config{'cc'} =~ /^bcc32/i) {
- # Turn off C++ mode of the Borland compiler
- $self->{CCFLAGS} =~ s/-P(\s|$)//g;
- $self->{OPTIMIZE} =~ s/-P(\s|$)//g;
- }
- elsif ($Config{'cc'} =~ /^gcc/i) {
- # Turn off C++ mode of the GCC compiler
- $self->{CCFLAGS} =~ s/-xc\+\+(\s|$)//g;
- $self->{OPTIMIZE} =~ s/-xc\+\+(\s|$)//g;
- }
- }
- }
-
if ($self->{POLLUTE}) {
$self->{CCFLAGS} .= ' -DPERL_POLLUTE ';
}
return $self->{CONST_CCCMD} if $self->{CONST_CCCMD};
return '' unless $self->needs_linking();
return $self->{CONST_CCCMD} =
- q{CCCMD = $(CC) -c $(INC) $(CCFLAGS) $(OPTIMIZE) \\
+ q{CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \\
+ $(CCFLAGS) $(OPTIMIZE) \\
$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \\
$(XS_DEFINE_VERSION)};
}
# Remove "Configure.pm" and similar, if it's not the only pod listed
# To force inclusion, just name it "Configure.pod", or override MAN3PODS
foreach $name (keys %manifypods) {
- if ($name =~ /(config|setup).*\.pm/is) {
+ if ($self->{PERL_CORE} and $name =~ /(config|setup).*\.pm/is) {
delete $manifypods{$name};
next;
}
my $inpod = 0;
while (<FH>) {
$inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
- next if $inpod;
+ next if $inpod || /^\s*#/;
chop;
# next unless /\$(([\w\:\']*)\bVERSION)\b.*\=/;
next unless /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/;
my($sep) = $Is_VMS ? ',' : '';
$sep .= "\\\n\t";
- foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE)){
+ foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE)) {
push @pasthru, "$key=\"\$($key)\"";
}
+ foreach $key (qw(DEFINE INC)) {
+ push @pasthru, "PASTHRU_$key=\"\$(PASTHRU_$key)\"";
+ }
+
push @m, "\nPASTHRU = ", join ($sep, @pasthru), "\n";
join "", @m;
}
$(PERL_INC)/keywords.h \
$(PERL_INC)/mg.h \
$(PERL_INC)/nostdio.h \
- $(PERL_INC)/objXSUB.h \
$(PERL_INC)/op.h \
$(PERL_INC)/opcode.h \
$(PERL_INC)/opnames.h \
Returns the attribute C<PERM_RW> or the string C<644>.
Used as the string that is passed
to the C<chmod> command to set the permissions for read/writeable files.
-MakeMaker chooses C<0644> because it has turned out in the past that
+MakeMaker chooses C<644> because it has turned out in the past that
relying on the umask provokes hard-to-track bug reports.
When the return value is used by the perl function C<chmod>, it is
interpreted as an octal value.
=cut
sub perm_rw {
- shift->{PERM_RW} || "0644";
+ shift->{PERM_RW} || "644";
}
=item perm_rwx (o)
-Returns the attribute C<PERM_RWX> or the string C<0755>,
+Returns the attribute C<PERM_RWX> or the string C<755>,
i.e. the string that is passed
to the C<chmod> command to set the permissions for executable files.
See also perl_rw.
=cut
sub perm_rwx {
- shift->{PERM_RWX} || "0755";
+ shift->{PERM_RWX} || "755";
}
=item pm_to_blib
subdirs ::
@[
cd $subdir
- \$(MAKE) all \$(PASTHRU)
+ \$(MAKE) -f \$(FIRST_MAKEFILE) all \$(PASTHRU)
cd ..
]
EOT
return <<EOT;
subdirs ::
cd $subdir
- \$(MAKE) all \$(PASTHRU)
+ \$(MAKE) -f \$(FIRST_MAKEFILE) all \$(PASTHRU)
cd ..
EOT
}
return <<EOT;
subdirs ::
- $self->{NOECHO}cd $subdir && \$(MAKE) all \$(PASTHRU)
-
+ $self->{NOECHO}cd $subdir && \$(MAKE) -f \$(FIRST_MAKEFILE) all \$(PASTHRU)
EOT
}
}
'
.xs$(OBJ_EXT):
$(PERLRUN) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
+ $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(PASTHRU_DEFINE) $(DEFINE) $*.c
';
}