diff options
author | Peter Powell <petpow@saberuk.com> | 2016-03-22 23:21:24 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2016-03-22 23:39:14 +0000 |
commit | 79f207e729eed41336779324262603bb03266d96 (patch) | |
tree | ee412c40613f232540241103b7cb23ca54d2ae29 /make/configure.pm | |
parent | 37d939829bb51d6e697d5a654d7dcc32522f01aa (diff) |
Simplify the configure cache file format.
This prevents the need to implement escaping of values which was
a bug in the previous format.
Diffstat (limited to 'make/configure.pm')
-rw-r--r-- | make/configure.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/make/configure.pm b/make/configure.pm index db9c42eb9..ee96e3c69 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -220,7 +220,7 @@ sub read_configure_cache { open(CACHE, CONFIGURE_CACHE_FILE) or return %config; while (my $line = <CACHE>) { next if $line =~ /^\s*($|\#)/; - my ($key, $value) = ($line =~ /^(\S+)="(.*)"$/); + my ($key, $value) = ($line =~ /^(\S+)(?:\s(.+))?$/); $config{$key} = $value; } close(CACHE); @@ -238,7 +238,7 @@ sub write_configure_cache(%) { open(CACHE, '>', CONFIGURE_CACHE_FILE) or print_error "unable to write ${\CONFIGURE_CACHE_FILE}: $!"; while (my ($key, $value) = each %config) { $value //= ''; - say CACHE "$key=\"$value\""; + say CACHE "$key $value"; } close(CACHE); } |