summaryrefslogtreecommitdiff
path: root/vms/mms2make.pl
diff options
context:
space:
mode:
Diffstat (limited to 'vms/mms2make.pl')
-rw-r--r--vms/mms2make.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/vms/mms2make.pl b/vms/mms2make.pl
index 54db616c86..6fdc924081 100644
--- a/vms/mms2make.pl
+++ b/vms/mms2make.pl
@@ -16,6 +16,8 @@
# 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
# an empty @conditions [assume nesting in descrip.mms is correct]
+# 2.1 26-Feb-1995 Charles Bailey bailey@genetics.upenn.edu
+# - handle MMS macros generated by MakeMaker
if ($#ARGV > -1 && $ARGV[0] =~ /^[\-\/]trim/i) {
$do_trim = 1;
@@ -83,6 +85,22 @@ while (<INFIL>) {
else { $firstsrc = "\$<" }
}
+#convert macros we expect to see in MakeMaker-generated Descrip.MMSs
+ s#/Descrip=\s*\n#-f \nMMS = make\n#;
+ s#/Macro=\(# #;
+ s#MACROEND = \)#MACROEND = #;
+ if (m#\$\(USEMACROS\)(.*)(\$\(MACROEND\))?#) {
+ while (1) {
+ my($macros,$end) = ($1,$2);
+ $macros =~ s/,/ /g; # We're hosed if there're commas within a macro -
+ # someday, check for "" and skip contents
+ last if $end;
+ print OUTFIL $conditions[0] ? "#> " : "",$_;
+ $_ = <INFIL>;
+ m#(.*)(\$\(MACROEND\))?#;
+ }
+ }
+
s/^ +/\t/;
s/^\.first/\.first:/i;
s/^\.suffixes/\.suffixes:/i;