From f6ca08eb5279fd4b84a8e639ab0a40b927f89948 Mon Sep 17 00:00:00 2001 From: Kevin Koch Date: Fri, 13 Apr 2007 22:29:58 +0000 Subject: [PATCH] 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 --- src/windows/build/BKWconfig.xml | 3 +-- src/windows/build/bkw.pl | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) 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}) { -- 2.26.2