This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In makedef.pl, merge the regexs that parse config.sh on non-dosish platforms.
authorNicholas Clark <nick@ccl4.org>
Sun, 17 Jul 2011 21:16:59 +0000 (23:16 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 1 Aug 2011 09:53:49 +0000 (11:53 +0200)
Use a plain alternation, instead of trying to "optimise", as the trie compiler
can do a much better job than a human.

makedef.pl

index 561b211..13943d8 100644 (file)
@@ -116,9 +116,8 @@ unless ($PLATFORM eq 'win32' || $PLATFORM eq 'wince' || $PLATFORM eq 'netware')
            $_ = $1;
            $define{$1} = 1 while /-D(\w+)/g;
        }
-       $define{config_args} = $1 if /^config_args='(.+)'$/;
-       $define{archname} =    $1 if /^archname='(.+)'$/;
-       $define{perl_patchlevel} =  $1 if /^perl_patchlevel='(.+)'$/;
+       $define{$1} = $2
+           if /^(config_args|archname|perl_patchlevel)='(.+)'$/;
        if ($PLATFORM eq 'vms') {
            $define{DEBUGGING} = 1 if /^usedebugging_perl='Y'$/;
            $define{UNLINK_ALL_VERSIONS} = 1 if /^d_unlink_all_versions='define'$/;