summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2004-03-08 02:18:43 -0600
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-03-09 21:45:49 +0000
commit1238c24d6105bee21a7821c5d638423d265f95d7 (patch)
treeea91d6d30861f297f4837588ccf6b9ec05fa1371 /lib
parentebe643b992508010c797fcd5c6ecf4d399139555 (diff)
downloadperl-1238c24d6105bee21a7821c5d638423d265f95d7.tar.gz
bleadperl/MM/VMS (was Re: perl@22413)
From: "Craig A. Berry" <craigberry@mac.com> Message-ID: <404C80C3.6090009@mac.com> Avoid to build everything twice on VMS. This is done by renaming the blibdirs target to blibdirs.exists. No, I don't understand why. p4raw-id: //depot/perl@22476
Diffstat (limited to 'lib')
-rw-r--r--lib/ExtUtils/MM_Any.pm8
-rw-r--r--lib/ExtUtils/MM_NW5.pm4
-rw-r--r--lib/ExtUtils/MM_Unix.pm22
-rw-r--r--lib/ExtUtils/MM_VMS.pm42
-rw-r--r--lib/ExtUtils/t/INST_PREFIX.t18
5 files changed, 64 insertions, 30 deletions
diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm
index 971fb8d696..9344f7c717 100644
--- a/lib/ExtUtils/MM_Any.pm
+++ b/lib/ExtUtils/MM_Any.pm
@@ -2,7 +2,7 @@ package ExtUtils::MM_Any;
use strict;
use vars qw($VERSION @ISA);
-$VERSION = 0.09;
+$VERSION = 0.09_01;
@ISA = qw(File::Spec);
use Config;
@@ -91,7 +91,7 @@ sub os_flavor_is {
my $make_frag = $mm->blibdirs_target;
-Creates the blibdirs target which creates all the directories we use in
+Creates the blibdirs.exists target which creates all the directories we use in
blib/.
=cut
@@ -107,9 +107,9 @@ sub blibdirs_target {
my @mkpath = $self->split_command('$(NOECHO) $(MKPATH)', @dirs);
my @chmod = $self->split_command('$(NOECHO) $(CHMOD) 755', @dirs);
- my $make = "\nblibdirs :: Makefile.PL \n";
+ my $make = "\nblibdirs.exists :: Makefile.PL \n";
$make .= join "", map { "\t$_\n" } @mkpath, @chmod;
- $make .= "\t\$(NOECHO) \$(TOUCH) blibdirs\n\n";
+ $make .= "\t\$(NOECHO) \$(TOUCH) blibdirs.exists\n\n";
return $make;
}
diff --git a/lib/ExtUtils/MM_NW5.pm b/lib/ExtUtils/MM_NW5.pm
index ca856df9da..14b35d555d 100644
--- a/lib/ExtUtils/MM_NW5.pm
+++ b/lib/ExtUtils/MM_NW5.pm
@@ -23,7 +23,7 @@ use Config;
use File::Basename;
use vars qw(@ISA $VERSION);
-$VERSION = '2.07';
+$VERSION = '2.07_01';
require ExtUtils::MM_Win32;
@ISA = qw(ExtUtils::MM_Win32);
@@ -152,7 +152,7 @@ sub static_lib {
return '' unless $self->has_link_code;
my $m = <<'END';
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs
+$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs.exists
$(RM_RF) $@
END
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index a1c21d223a..c5446af2ff 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -20,7 +20,7 @@ use vars qw($VERSION @ISA
use ExtUtils::MakeMaker qw($Verbose neatvalue);
-$VERSION = '1.45';
+$VERSION = '1.45_01';
require ExtUtils::MM_Any;
@ISA = qw(ExtUtils::MM_Any);
@@ -296,7 +296,7 @@ clean :: clean_subdirs
$(INST_ARCHAUTODIR)/extralibs.all
$(INST_ARCHAUTODIR)/extralibs.ld
perlmain.c tmon.out mon.out so_locations
- blibdirs pm_to_blib
+ blibdirs.exists pm_to_blib
*$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT)
$(BOOTSTRAP) $(BASEEXT).bso
$(BASEEXT).def lib$(BASEEXT).def
@@ -614,10 +614,10 @@ MAKE_FRAG
}
- # So these new .exists targets get called along with blibdirs.
+ # So these new .exists targets get called along with blibdirs.exists.
my $blib_addition = '';
$blib_addition = <<MAKE_FRAG if @targs;
-blibdirs :: @targs
+blibdirs.exists :: @targs
\$(NOECHO) \$(NOOP)
MAKE_FRAG
@@ -1078,7 +1078,7 @@ BOOTSTRAP = $(BASEEXT).bs
# As Mkbootstrap might not write a file (if none is required)
# we use touch to prevent make continually trying to remake it.
# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP): $(FIRST_MAKEFILE) $(BOOTDEP) blibdirs
+$(BOOTSTRAP): $(FIRST_MAKEFILE) $(BOOTDEP) blibdirs.exists
$(NOECHO) $(ECHO) "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))"
$(NOECHO) $(PERLRUN) \
"-MExtUtils::Mkbootstrap" \
@@ -1086,7 +1086,7 @@ $(BOOTSTRAP): $(FIRST_MAKEFILE) $(BOOTDEP) blibdirs
$(NOECHO) $(TOUCH) $(BOOTSTRAP)
$(CHMOD) $(PERM_RW) $@
-$(INST_BOOT): $(BOOTSTRAP) blibdirs
+$(INST_BOOT): $(BOOTSTRAP) blibdirs.exists
$(NOECHO) $(RM_RF) $(INST_BOOT)
-$(CP) $(BOOTSTRAP) $(INST_BOOT)
$(CHMOD) $(PERM_RW) $@
@@ -1121,7 +1121,7 @@ OTHERLDFLAGS = '.$ld_opt.$otherldflags.'
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
INST_DYNAMIC_FIX = '.$ld_fix.'
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) blibdirs $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) blibdirs.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
');
if ($armaybe ne ':'){
$ldfrom = 'tmp$(LIB_EXT)';
@@ -2641,7 +2641,7 @@ realclean ::
last unless defined $from;
my $todir = dirname($to);
push @m, "
-$to : $from \$(FIRST_MAKEFILE) blibdirs
+$to : $from \$(FIRST_MAKEFILE) blibdirs.exists
\$(NOECHO) \$(RM_F) $to
\$(CP) $from $to
\$(FIXIN) $to
@@ -2889,7 +2889,7 @@ LLIBPERL = $llibperl
";
push @m, "
-\$(INST_ARCHAUTODIR)/extralibs.all: blibdirs ".join(" \\\n\t", @$extra).'
+\$(INST_ARCHAUTODIR)/extralibs.all: blibdirs.exists ".join(" \\\n\t", @$extra).'
$(NOECHO) $(RM_F) $@
$(NOECHO) $(TOUCH) $@
';
@@ -3698,7 +3698,7 @@ sub static_lib {
my(@m);
push(@m, <<'END');
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs
+$(INST_STATIC): $(OBJECT) $(MYEXTLIB) blibdirs.exists
$(RM_RF) $@
END
@@ -4030,7 +4030,7 @@ pure_all :: config pm_to_blib subdirs linkext
subdirs :: $(MYEXTLIB)
$(NOECHO) $(NOOP)
-config :: $(FIRST_MAKEFILE) blibdirs
+config :: $(FIRST_MAKEFILE) blibdirs.exists
$(NOECHO) $(NOOP)
';
diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm
index 2b2f50d97b..7cf0e2f196 100644
--- a/lib/ExtUtils/MM_VMS.pm
+++ b/lib/ExtUtils/MM_VMS.pm
@@ -20,7 +20,7 @@ BEGIN {
use File::Basename;
use vars qw($Revision @ISA $VERSION);
-($VERSION) = '5.71';
+($VERSION) = '5.71_01';
($Revision) = q$Revision: 1.113 $ =~ /Revision:\s+(\S+)/;
require ExtUtils::MM_Any;
@@ -1006,7 +1006,7 @@ INST_DYNAMIC_DEP = $inst_dynamic_dep
";
push @m, '
-$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt blibdirs $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt blibdirs.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
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
@@ -1032,13 +1032,13 @@ BOOTSTRAP = '."$self->{BASEEXT}.bs".'
# As MakeMaker mkbootstrap might not write a file (if none is required)
# we use touch to prevent make continually trying to remake it.
# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP) : $(FIRST_MAKEFILE) '."$self->{BOOTDEP}".' blibdirs
+$(BOOTSTRAP) : $(FIRST_MAKEFILE) '."$self->{BOOTDEP}".' blibdirs.exists
$(NOECHO) $(ECHO) "Running mkbootstrap for $(NAME) ($(BSLOADLIBS))"
$(NOECHO) $(PERLRUN) -
-e "use ExtUtils::Mkbootstrap; Mkbootstrap(\'$(BASEEXT)\',\'$(BSLOADLIBS)\');"
$(NOECHO) $(TOUCH) $(MMS$TARGET)
-$(INST_BOOT) : $(BOOTSTRAP) blibdirs
+$(INST_BOOT) : $(BOOTSTRAP) blibdirs.exists
$(NOECHO) $(RM_RF) $(INST_BOOT)
- $(CP) $(BOOTSTRAP) $(INST_BOOT)
';
@@ -1062,7 +1062,7 @@ $(INST_STATIC) :
my(@m,$lib);
push @m,'
# Rely on suffix rule for update action
-$(OBJECT) : blibdirs
+$(OBJECT) : blibdirs.exists
$(INST_STATIC) : $(OBJECT) $(MYEXTLIB)
';
@@ -1170,7 +1170,7 @@ realclean ::
}
$todir = $self->fixpath($todir,1);
push @m, "
-$to : $from \$(FIRST_MAKEFILE) blibdirs
+$to : $from \$(FIRST_MAKEFILE) blibdirs.exists
\$(CP) $from $to
";
@@ -1236,7 +1236,7 @@ clean :: clean_subdirs
}
}
push(@otherfiles, qw[ blib $(MAKE_APERL_FILE)
- perlmain.c blibdirs pm_to_blib pm_to_blib.ts ]);
+ perlmain.c blibdirs.exists pm_to_blib pm_to_blib.ts ]);
push(@otherfiles, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.all'));
push(@otherfiles, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.ld'));
@@ -2332,6 +2332,34 @@ sub os_flavor {
return('VMS');
}
+=item blibdirs_target (override)
+
+ my $make_frag = $mm->blibdirs_target;
+
+Creates the blibdirs.exists target which creates all the directories we use in
+blib/. Override because older CRTLs have trouble with C<mkpath '[.foo]'> (as
+opposed to C<mkpath 'foo.dir'>).
+
+=cut
+
+sub blibdirs_target {
+ my $self = shift;
+
+ my @dirs = map { uc "\$(INST_$_)" } qw(libdir
+ autodir archautodir
+ bin script
+ man1dir man3dir
+ );
+
+ my $make = "\nblibdirs.exists :: \n";
+ for my $dir (@dirs) {
+ $make .= "\t" . '$(NOECHO) CREATE/DIRECTORY/PROTECTION=(O:RWE,G:RE,W:RE) ' . $dir . "\n";
+ }
+ $make .= "\t\$(NOECHO) \$(TOUCH) blibdirs.exists\n\n";
+
+ return $make;
+}
+
=back
=cut
diff --git a/lib/ExtUtils/t/INST_PREFIX.t b/lib/ExtUtils/t/INST_PREFIX.t
index 3c7d922c87..8b9d175b35 100644
--- a/lib/ExtUtils/t/INST_PREFIX.t
+++ b/lib/ExtUtils/t/INST_PREFIX.t
@@ -232,10 +232,13 @@ while( my($type, $vars) = each %Install_Vars) {
is( $mm->{INSTALLMAN1DIR}, File::Spec->catdir('foo', 'bar') );
is( $mm->{INSTALLMAN3DIR}, File::Spec->catdir('foo', 'baz') );
- is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
- is( $mm->{INSTALLVENDORMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLVENDORMAN3DIR}, '$(INSTALLMAN3DIR)' );
+ SKIP: {
+ skip "VMS must expand macros in INSTALL* vars", 4 if $Is_VMS;
+ is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
+ is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
+ is( $mm->{INSTALLVENDORMAN1DIR}, '$(INSTALLMAN1DIR)' );
+ is( $mm->{INSTALLVENDORMAN3DIR}, '$(INSTALLMAN3DIR)' );
+ }
}
@@ -266,8 +269,11 @@ while( my($type, $vars) = each %Install_Vars) {
is( $mm->{INSTALLMAN1DIR}, File::Spec->catdir('foo', 'bar') );
is( $mm->{INSTALLMAN3DIR}, File::Spec->catdir('foo', 'baz') );
- is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
+ SKIP: {
+ skip "VMS must expand macros in INSTALL* vars", 2 if $Is_VMS;
+ is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
+ is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
+ }
is( $mm->{INSTALLVENDORMAN1DIR}, '' );
is( $mm->{INSTALLVENDORMAN3DIR}, '' );
}