2 while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/)
8 $opt{'archname'} = 'MSWin32';
9 if (defined $ENV{'PROCESSOR_ARCHITECTURE'})
11 $opt{'archname'} .= '-'.$ENV{'PROCESSOR_ARCHITECTURE'};
14 if ($opt{'ccflags'} =~ /USE_THREADS/)
16 $opt{'archname'} .= '-thread';
19 if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true
20 $opt{PATCHLEVEL} = int($1 || 0);
21 $opt{SUBVERSION} = $2 || '00';
24 $opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'};
25 $opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0]
26 unless $opt{'cf_email'};
30 s/~([\w_]+)~/$opt{$1}/g;
31 if (/^([\w_]+)=(.*)$/) {
32 # this depends on cf_time being empty in the template (or we'll get a loop)
33 if ($1 eq 'cf_time') {
34 $_ = "$1='" . localtime(time) . "'\n" if $2 =~ /^\s*'\s*'/;
36 elsif (exists $opt{$1}) {
37 $_ = "$1='$opt{$1}'\n";