diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2007-04-25 21:37:49 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2007-04-25 21:37:49 +0000 |
commit | 657ecf14acc58a6d345341a5e36411bde5be9cd9 (patch) | |
tree | 4f5a53feb9c26991d822e2e606de511f57e32be6 /install-win32/macro.pl | |
parent | Forgot to add changelog item about OpenVPN GUI being (diff) | |
download | openvpn-657ecf14acc58a6d345341a5e36411bde5be9cd9.tar.xz |
TAP driver now passes signing tests on Vista x64.
Added new settings to settings.in to better control
build process.
Removed some unneeded JYFIXMEs from source code.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1874 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'install-win32/macro.pl')
-rw-r--r-- | install-win32/macro.pl | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/install-win32/macro.pl b/install-win32/macro.pl index 4705310..08ba58a 100644 --- a/install-win32/macro.pl +++ b/install-win32/macro.pl @@ -15,38 +15,47 @@ $open_quote = "@@"; $close_quote = "@@"; while ($arg=shift(@ARGV)) { - if ($arg =~ /^-/) { - if ($arg =~ /^-D(\w+)=(.*)$/) { - $Parms{$1} = $2 - } elsif ($arg =~ /-O(.*)$/) { - $open_quote = $1; - } elsif ($arg =~ /-C(.*)$/) { - $close_quote = $1; - } else { - die "unrecognized option: $arg"; - } + if ($arg =~ /^-/) { + if ($arg =~ /^-D(\w+)(?:=(.*))?$/) { + $Parms{$1} = $2 + } elsif ($arg =~ /-O(.*)$/) { + $open_quote = $1; + } elsif ($arg =~ /-C(.*)$/) { + $close_quote = $1; } else { - open(CONTROL, "< $arg") or die "cannot open $arg"; - while (<CONTROL>) { - chomp; - if (/^define\s+(\w+)\s+['"]?(.+?)['"]?\s*$/) { - $Parms{$1} = $2 - } - } + die "unrecognized option: $arg"; } + } else { + open(CONTROL, "< $arg") or die "cannot open $arg"; + while (<CONTROL>) { + if (/^!define\s+(\w+)(?:\s+['"]?(.*?)['"]?)?\s*$/) { + $Parms{$1} = $2; + } + } + } +} + +sub print_symbol_table { + foreach my $k (sort (keys(%Parms))) { + my $v = $Parms{$k}; + print "[$k] -> \"$v\"\n"; + } } +#print_symbol_table (); +#exit 0; + while (<STDIN>) { s{ \Q$open_quote\E \s* ( - \w+ - ) + \w+ + ) \s* \Q$close_quote\E }{ $Parms{$1} - }xge; + }xge; print; } |