Change 16161 by jhi@alpha on 2002/04/25 17:26:53
Subject: [PATCH MM 5.91_02] MM_VMS.pm: handle empty PM_TO_BLIB
From: "Craig A. Berry" <[EMAIL PROTECTED]>
Date: Thu, 25 Apr 2002 12:30:06 -0500
Message-Id: <a05111700b8edeb2f3419@[172.16.52.1]>
Affected files ...
.... //depot/perl/lib/ExtUtils/MM_VMS.pm#57 edit
Differences ...
==== //depot/perl/lib/ExtUtils/MM_VMS.pm#57 (text) ====
Index: perl/lib/ExtUtils/MM_VMS.pm
--- perl/lib/ExtUtils/MM_VMS.pm.~1~ Thu Apr 25 11:30:06 2002
+++ perl/lib/ExtUtils/MM_VMS.pm Thu Apr 25 11:30:06 2002
@@ -745,29 +745,28 @@
pm_to_blib : pm_to_blib.ts
$(NOECHO) $(NOOP)
+# As always, keep under DCL's 255-char limit
+pm_to_blib.ts : $(TO_INST_PM)
};
- push @m, <<'MAKE_FRAG',
-# As always, keep under DCL's 255-char limit
-pm_to_blib.ts : $(TO_INST_PM)
- $(NOECHO) $(RM_F) .MM_tmp
-MAKE_FRAG
+ if (scalar(@files) > 0) { # protect ourselves from empty PM_TO_BLIB
- $line = ''; # avoid uninitialized var warning
- while ($from = shift(@files),$to = shift(@files)) {
+ push(@m,qq[\t\$(NOECHO) \$(RM_F) .MM_tmp\n]);
+ $line = ''; # avoid uninitialized var warning
+ while ($from = shift(@files),$to = shift(@files)) {
$line .= " $from $to";
if (length($line) > 128) {
push(@m,"\t\$(NOECHO) \$(PERL) -e \"print '$line'\" >>.MM_tmp\n");
$line = '';
}
+ }
+ push(@m,"\t\$(NOECHO) \$(PERL) -e \"print '$line'\" >>.MM_tmp\n") if $line;
+
+ push(@m,q[ $(PERLRUN) "-MExtUtils::Install" -e "pm_to_blib({split('
+',<STDIN>)},'].$autodir.q[','$(PM_FILTER)')" <.MM_tmp]);
+ push(@m,qq[\n\t\$(NOECHO) \$(RM_F) .MM_tmp\n]);
+
}
- push(@m,"\t\$(NOECHO) \$(PERL) -e \"print '$line'\" >>.MM_tmp\n") if $line;
-
- push(@m,q[ $(PERLRUN) "-MExtUtils::Install" -e "pm_to_blib({split('
',<STDIN>)},'].$autodir.q[','$(PM_FILTER)')" <.MM_tmp]);
- push(@m,qq[
- \$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;
- \$(NOECHO) \$(TOUCH) pm_to_blib.ts
-]);
+ push(@m,qq[\t\$(NOECHO) \$(TOUCH) pm_to_blib.ts]);
join('',@m);
}
End of Patch.