This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Work around prefixing bug in older DECC preprocessors
[perl5.git] / vms / genconfig.pl
index 45f50ca..e500e76 100644 (file)
@@ -391,8 +391,14 @@ else { warn "Can't read ${outdir}crtl.opt - skipping 'libs' & 'libc'"; }
 
 if (open(PL,"${outdir}patchlevel.h")) {
   while (<PL>) {
-    if    (/^#define PATCHLEVEL\s+(\S+)/) { print OUT "PATCHLEVEL='$1'\n"; }
-    elsif (/^#define SUBVERSION\s+(\S+)/) { print OUT "SUBVERSION='$1'\n"; }
+    if    (/^#define PERL_VERSION\s+(\S+)/) {
+      print OUT "PERL_VERSION='$1'\n";
+      print OUT "PATCHLEVEL='$1'\n";   # XXX compat
+    }
+    elsif (/^#define PERL_SUBVERSION\s+(\S+)/) {
+      print OUT "PERL_SUBVERSION='$1'\n";
+      print OUT "SUBVERSION='$1'\n";   # XXX compat
+    }
   }
   close PL;
 }