From 79f207e729eed41336779324262603bb03266d96 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 22 Mar 2016 23:21:24 +0000 Subject: Simplify the configure cache file format. This prevents the need to implement escaping of values which was a bug in the previous format. --- make/configure.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'make/configure.pm') 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 = ) { 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); } -- cgit v1.2.3