This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[Merge] [perl #129916] Allow sub-in-stash outside of main
[perl5.git] / vms / mms2make.pl
index 6fdc924..7a83052 100644 (file)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl
 #
 #  mms2make.pl - convert Descrip.MMS file to Makefile
-#  Version 2.0 29-Sep-1994
+#  Version 2.2 29-Jan-1996
 #  David Denholm <denholm@conmat.phys.soton.ac.uk>
 #
-#  1.0  06-Aug-1994  Charles Bailey  bailey@genetics.upenn.edu
+#  1.0  06-Aug-1994  Charles Bailey  bailey@newman.upenn.edu
 #    - original version
 #  2.0  29-Sep-1994  David Denholm <denholm@conmat.phys.soton.ac.uk>
 #    - take action based on MMS .if / .else / .endif
 #      we invert top of stack at a .else
 #      we pop at a .endif
 #      we deselect any other line if $conditions[0] is 0
-#      I'm being very lazy - push a 1 at start, then dont need to check for
+#      I'm being very lazy - push a 1 at start, then don't need to check for
 #      an empty @conditions [assume nesting in descrip.mms is correct] 
-#  2.1  26-Feb-1995  Charles Bailey  bailey@genetics.upenn.edu
+#  2.1  26-Feb-1995  Charles Bailey  bailey@newman.upenn.edu
 #    - handle MMS macros generated by MakeMaker
+#  2.2  29-Jan-1996  Charles Bailey  bailey@newman.upenn.edu
+#    - Fix output file name to work under Unix
 
 if ($#ARGV > -1 && $ARGV[0] =~ /^[\-\/]trim/i) {
   $do_trim = 1;
   shift @ARGV;
 }
 $infile  = $#ARGV > -1 ? shift(@ARGV) : "Descrip.MMS";
-$outfile = $#ARGV > -1 ? shift(@ARGV) : "Makefile.";
+$outfile = $#ARGV > -1 ? shift(@ARGV) : "Makefile";
 
 # set any other args in %macros - set VAXC by default
 foreach (@ARGV) { $macros{"\U$_"}=1 }
@@ -36,8 +38,8 @@ $macros{"DECC"} = 1 if $macros{"__AXP__"};
 # [lazy - saves having to check for empty array - just test [0]==1]
 @conditions = (1);
 
-open(INFIL,$infile) || die "Can't open $infile: $!\n"; 
-open(OUTFIL,">$outfile") || die "Can't open $outfile: $!\n"; 
+open(INFIL,'<',$infile) || die "Can't open $infile: $!\n"; 
+open(OUTFIL,'>',$outfile) || die "Can't open $outfile: $!\n"; 
 
 print OUTFIL "#> This file produced from $infile by $0\n";
 print OUTFIL "#> Lines beginning with \"#>\" were commented out during the\n";