summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-05 22:09:27 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-05 22:09:27 +0000
commit3e9ffe509f527252a23d5921dcd6cd5a3671012b (patch)
tree6cabf1f30243af107997cd546fbcc42b5f4a2883 /lib
parent9f650e9466ddbdd698cc73572057033959aec863 (diff)
downloadperl-3e9ffe509f527252a23d5921dcd6cd5a3671012b.tar.gz
Retract MM_NW5.pm part of #16371, at the request
of Michael Schwern. p4raw-id: //depot/perl@16418
Diffstat (limited to 'lib')
-rw-r--r--lib/ExtUtils/MM_NW5.pm44
1 files changed, 26 insertions, 18 deletions
diff --git a/lib/ExtUtils/MM_NW5.pm b/lib/ExtUtils/MM_NW5.pm
index c70dc9979b..97cee2e92d 100644
--- a/lib/ExtUtils/MM_NW5.pm
+++ b/lib/ExtUtils/MM_NW5.pm
@@ -18,6 +18,7 @@ the semantics.
=cut
+use strict;
use Config;
use File::Basename;
@@ -71,7 +72,7 @@ sub const_cccmd {
return $self->{CONST_CCCMD} = <<'MAKE_FRAG';
CCCMD = $(CC) $(CCFLAGS) $(INC) $(OPTIMIZE) \
$(PERLTYPE) $(MPOLLUTE) -o $@ \
- -DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(XS_VERSION)\"
+ -DVERSION="$(VERSION)" -DXS_VERSION="$(XS_VERSION)"
MAKE_FRAG
}
@@ -247,36 +248,43 @@ PM_TO_BLIB = }.join(" \\\n\t", %{$self->{PM}}).q{
sub static_lib {
my($self) = @_;
-# Come to think of it, if there are subdirs with linkcode, we still have no INST_STATIC
-# return '' unless $self->needs_linking(); #might be because of a subdir
return '' unless $self->has_link_code;
- my(@m);
- push(@m, <<'END');
+ my $m = <<'END';
$(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)\.exists
$(RM_RF) $@
END
# If this extension has it's own library (eg SDBM_File)
# then copy that to $(INST_STATIC) and add $(OBJECT) into it.
- push(@m, "\t$self->{CP} \$(MYEXTLIB) \$\@\n") if $self->{MYEXTLIB};
+ $m .= <<'END' if $self->{MYEXTLIB};
+ $self->{CP} $(MYEXTLIB) $\@
+END
+
+ my $ar_arg;
+ if( $BORLAND ) {
+ $ar_arg = '$@ $(OBJECT:^"+")';
+ }
+ elsif( $GCC ) {
+ $ar_arg = '-ru $@ $(OBJECT)';
+ }
+ else {
+ $ar_arg = '-type library -o $@ $(OBJECT)';
+ }
- push @m,
-q{ $(AR) }.($BORLAND ? '$@ $(OBJECT:^"+")'
- : ($GCC ? '-ru $@ $(OBJECT)'
- : '-type library -o $@ $(OBJECT)')).q{
- }.$self->{NOECHO}.q{echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld
+ $m .= sprintf <<'END', $ar_arg;
+ $(AR) %s
+ $(NOECHO)echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld
$(CHMOD) 755 $@
-};
-# CW change ( -type library ... )
-# Old mechanism - still available:
+END
- push @m, "\t$self->{NOECHO}".q{echo "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs}."\n\n"
- if $self->{PERL_SRC};
+ $m .= <<'END' if $self->{PERL_SRC};
+ $(NOECHO)echo "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs
- push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
- join('', "\n",@m);
+END
+
+ return $m;
}