From: Peter Powell Date: Tue, 22 Mar 2016 23:21:24 +0000 (+0000) Subject: Simplify the configure cache file format. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=79f207e729eed41336779324262603bb03266d96;p=user%2Fhenk%2Fcode%2Finspircd.git Simplify the configure cache file format. This prevents the need to implement escaping of values which was a bug in the previous format. --- 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); }