From: Craig A. Berry Date: Mon, 8 Mar 2004 08:18:43 +0000 (-0600) Subject: bleadperl/MM/VMS (was Re: perl@22413) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1238c24d6105bee21a7821c5d638423d265f95d7;p=p5sagit%2Fp5-mst-13.2.git bleadperl/MM/VMS (was Re: perl@22413) From: "Craig A. Berry" 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 --- diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm index 971fb8d..9344f7c 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 ca856df..14b35d5 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 a1c21d2..c5446af 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 = <{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 (as +opposed to C). + +=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 3c7d922..8b9d175 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}, '' ); }