From: Kevin Koch Date: Fri, 13 Apr 2007 22:29:58 +0000 (+0000) Subject: Implement environment variable settings from the config xml file. See notes in bkwco... X-Git-Tag: krb5-1.7-alpha1~1142 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f6ca08eb5279fd4b84a8e639ab0a40b927f89948;p=krb5.git Implement environment variable settings from the config xml file. See notes in bkwconfig.xml Target_Version: 1.6.1 Ticket: 5521 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19469 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/windows/build/BKWconfig.xml b/src/windows/build/BKWconfig.xml index 654396685..b7c11d181 100644 --- a/src/windows/build/BKWconfig.xml +++ b/src/windows/build/BKWconfig.xml @@ -2,7 +2,7 @@ - > - diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl index c7ecf0720..6ea7c7f33 100644 --- a/src/windows/build/bkw.pl +++ b/src/windows/build/bkw.pl @@ -176,6 +176,13 @@ sub main { # Scan the configuration for switch definitions: while (($sw, $val) = each %$odr) { next if (! exists $val->{def}); ## ?? Should always exist. + + # Set/clear environment variables: + if ($val->{env}) { + if ($val->{def}) {$ENV{$sw} = (exists $val->{value}) ? $val->{value} : 1; } + else {delete $ENV{$sw}; } + } + # If the switch is in the command line, override the stored value: if (exists $OPT->{$sw}) { if (exists $val->{value}) {